Introduction of Themes For Silverlight 3 Navigation Application

No.of Views902
Bookmarked0 times
Downloads 
Votes0
By  dpatra   On  07 Apr 2010 07:04:09
Tag : Silver Light and XAML , Skin And GUI
We experienced styles in each and every control level. Now in Application Level we have some themes too.
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

In my previous article on “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.

Creating Silverlight Project

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

 

Image Loading

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

 

Image Loading

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.

<Application   
  x:Class="ThemesNavSL3.App"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

  <Application.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Assets/Styles.xaml"/>
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </Application.Resources>

</Application>


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:
 

Image Loading

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


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

Image Loading

Lime Shocker theme:

Image Loading

Pinky theme:

Image Loading

Retro theme:

Image Loading

Subdued theme:

Image Loading

That’s it. Look for the Gallery to know updated themes.
Enjoy Coding.
 

 
Sign Up to vote for this article
 
About Author
 
dpatra
Occupation-Not Provided
Company-Not Provided
Member Type-Expert
Location-Not Provided
Joined date-13 Jul 2009
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
    The color of the silverlight scroll bar was looking very ugly in one of my projects and it needs to be changed. Am so sure that the regular, default pale scroll bars suck most of the time. When the situation demands color tweaking for the scroll bar: Few simple steps and a few minutes of time, it’s done.
    Published Date : 15/Dec/2010
    Tilt an image on mouse move in Silverlight 3 (3D Animation)
    Published Date : 16/Feb/2010
    in this article, i will describe,How to use styles in Silverlight
    Published Date : 16/Feb/2010
    Every time you could have imagined for any background image for your application and for some controls. In Silverlight 2 and Silverlight 3 Beta it was not so easy to put Images as Background and do some Tiling. Using Tile Brush in Silverlight 3 we will be able to use images as background. In this article we will see how can we achieve that.
    Published Date : 08/Apr/2010
    Themes are nothing but some predefined styles for each and every control. For example you want a Blue Theme for your Silverlight Application that is for all of your controls inside the application.
    Published Date : 08/Apr/2010
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top