March 2008 Archives

Mar 12, 2008

Programmatic drawing with Silverlight 2 Part 3: Simple Animation

Posted by Dennis in Silverlight 6 comments

This example shows you how you can make a simple line animation in Silverlight 2. There isn’t much documentation about this yet, so it took some figuring out on how to do this correctly.
Basically these are the steps to create an animation:

Create a Storyboard object
Set the Storyboard’s Duration property
Create a DoubleAnimation object
Set the DoubleAnimation object’s [...]


Mar 4, 2008

Silverlight 2 Beta 1 C# Truchet Tiling

Posted by Dennis in Silverlight 4 comments

Truchet Tiling is an easy way of creating random patterns. See what it looks like here.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Truchet3
{
public partial class Page : UserControl
{
public Page()
[...]


Mar 4, 2008

An essential AIR application for serious guitarists

Posted by Dennis in AIR 18 comments

I just finished the new version of my guitar scales application. When AIR was still Apollo I created a first rough version with a standard Flex look. Now that AIR 1.0 has been released it was time to do it properly.

This application lets you pick a scale and draws it on a virtual fretboard. You [...]


Mar 3, 2008

Programmatic drawing with Silverlight Part 2: C#

Posted by Dennis in Silverlight 6 comments

In one of my previous posts I explored how programmatic drawing with Silverlight 1.0/JavaScript worked. It was done by constructing a XAML string and inserting it into the XAML hierarchy. Not a nice way of doing things, imho.
Fortunately Silverlight 1.1 alpha offers the possibility to use C#. This way there’s no need to construct strings [...]