Silverlight 4 Themes

Hi I’ve been playing with Silverlight 4 – Themes which  come from the official toolkit :http://silverlight.codeplex.com/wikipage?title=Silverlight%20Toolkit%20Overview%20Part%203&referringTitle=Home.

For someone like me who just get  started with Silverlight it was not so easy to get it to work at first.  I’ve notice that there is no steps by step guidance that shows how to apply theme from the toolkit and I decided to write one Smile .

What I’ve done is just built a small sample and put together a few controls:  Button and Tab.

Below I am going to outline the main steps that was needed to get theme applied to the above controls:

So first of all , you need of following assemblies form the toolkit:

assemblies

If you have not got it installed  you could download and build it from source : http://silverlight.codeplex.com/

In my sample I ‘m using BureauBlack theme because of that you can see this particular  assembly in the picture. Of course if you prefer another Theme you need to replace this assembly. 

Next step is to make  the the desired Theme available to the XAML page like this:

reference

Once a reference has been added you can apply the theme over desired elements from the XAMAL as you surround them . I wanted the entire UserControl to get this cool outlook  and because of that I surrounded the entire grid:

xamal

The result with applied theme is like this:

Themes

Without Theme:

withoutThemes

For easier start up I  have uploaded the testing sample here:  sample

Hope it helps!

Rado

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s