.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> Silverlight >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Craete and Apply Themes For Silverlight Navigation Application

Posted By:Diptimaya Patra       Posted Date: April 08, 2010    Points: 25    Category: Silverlight    URL: http://www.dotnetspark.com  

Create and Apply Themes For Silverlight Navigation Application. In this article we will see how to use themes for Navigation Application in Silverlight with sample code.
 

Introduction


In my previous article on "Create and Apply Themes In Silverlight 3 Application", we experienced styles in each and every control level. Now in Application Level we have some themes too.

To download Silverlight 3 Navigation Application themes, click here.

In this article we will see how to use themes for Navigation Application in Silverlight 3.

Crating Silverlight Project

Fire up Visual Studio 2008 and create a Silverlight Navigation Application. Name it as ThemesNavSL3.

image1.gif

After creating the Silverlight Navigation Application, the solution explorer will look similar to the following:

image2.gif

In the solution explorer the Silverlight project consists of 2 Folders as Assets and Views.

Views, as its name says it has all the views the applications needs.

Now give a look on the Assets folder, as you see it has a xaml file named Style.xaml without any C# code behind. What is it?

Yes you are right; this is a Resource Dictionary file. If you look at App.xaml code behind, it clearly says that it is a Resource Dictionary.



  
    
      
        
      
    
  



For more information on Resource Dictionary follow my article titled "Resource Dictionary in Silverlight 3 Application Using Blend 3".

Now that you have downloaded the themes for Navigation Application; it comes with Zip files.

Unzip the content and you will find the Resource Dictionary in the same filename as we just saw, Style.xaml.

Delete the Resource Dictionary from the Assets folder and copy the new Styles.xaml to the folder.

I have used the Arora theme. Go ahead and run your application and you will find the amazing theme as follows:

image3.gif

Go ahead and use all the themes and see which one matches your requirement.

Frosted Cinamontoast theme: you may need to add some assemblies.

image4.gif

Lime Shocker theme:

image5.gif

Pinky theme:

image6.gif

Retro theme:

image7.gif

Subdued theme:

image8.gif

That's it. Look for the Gallery to know updated themes.

Enjoy Coding.


 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend