Styling the Focus Panel : Visual State Manager

The Focus Panel is starting come together but it'll be good to add some more customizability to the controls. In this post we'll add the ability to not only style the panel items but to give the different states of the items their own style.

Refactoring Focus Panel: ItemsControl

So while the FocusPanel we built in "Using our animation framework, a focus panel " it had a lot of room for improvement. The biggest to change are, the bad syntax required to add items to the panel in xaml and the inability to bind data to the collection. Previously, anything we wanted to add to the panel had to be declared within a FocusPanelItem which was the control that was animated and had the focus button". I forgot to include this in the previous post but the xaml for the example you can see at " Focus Panel example" is as follows.

Silverlight Animation Part 3: Opacity

Time to extend our burgeoning framework with the ability to programmatically animate an items opacity. It's pretty quick and I hope easy to follow code, we're not using key frames or any splines to animate this, just a simple linear animation. Here's the code.

Using our animation framework, a focus panel

Now that we have the basics of an animation framework in place from the following posts "Beginning a Silverlight animation framework" and "Silverlight Animation Part 2 : Size" we can start to build something useful with it.

Watch out when refactoring Silverlight namespaces

This was a small problem that had me stumped for around 10 minutes. Often I have the default namespace and assembly (and .xap) name to a project differ from the project name. For example if the solution is CompiledExperience.Examples and the project is Animation.Position then the namespace I'll set as *CompiledExperience.Examples.Animation.Position *for consistencies sake.