Thursday, November 6, 2008

Silverlight 2 : Theming from Silverlight 2 Toolkit

It’s now time to put on some cool Themes to your Silverlight 2 Controls.

I have already talked about Silverlight toolkit in my last post, This is add-on to my last post on control toolkit.

There are few built-in themes you will get as control in form of DLL in toolkit setup, see this :

  • Expression Dark
  • Expression Light
  • Rainier Orange
  • Rainier Purple
  • ShinyBlue
  • ShinyRed

DLLS

Here is the sample code for one theme,same is for rest :

<Grid x:Name="LayoutRoot" Background="White">
       <shinyRed:ShinyRedTheme>
             <StackPanel Margin="10">
                <Button Margin="5" Height="28" HorizontalAlignment="Left" Width="86" Content="Vikram"/>
                <ComboBox Margin="5">
                    <ComboBoxItem Content="Vikram Pendse" IsSelected="true"/>
                </ComboBox>
                <CheckBox Content="Ready to Rock??" IsChecked="true" Margin="5"/>
        </StackPanel>
    </shinyRed:ShinyRedTheme>

 

Outputs for various Themes given in list above :

ExpressionDarkTheme

ExpressionLightTheme

RainierOrange  

RainierPurpleTheme

ShinyBlueTheme

ShinyRedTheme

For more in-depth reading visit following interesting article :

http://www.codeplex.com/Silverlight/Wiki/View.aspx?title=Silverlight%20Toolkit%20Overview%20Part%203&referringTitle=Home

Vikram.

No comments: