Reusable themes for WPF application

I was trying to find good themes for my personal projects which I could directly use and concentrate on the functionality instead of decorating the application. But the lack of good free WPF themes forced me to create it on my own. And since I have created one, I thought of sharing it as well so that other people in dire need of such resource do not suffer the same frustration.

So, here it is. There are two versions of the themes, dark and light, to suit everyone’s needs.

Here is how an application would look after using the themes:

Dark Theme

theme

Light Theme

lightTheme

 

Theme Usage

Usage of theme is extremely simple. Here are the steps to incorporate these themes into your application.

Step 1: Download the theme files (link at the end of article).

Step 2: Add the themes folder to your project.

Step 3: Add the theme xaml to your resource dictionary. If you want to apply the theme throughout the application, add these lines inside app.xaml-

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

If you’d like to use the light theme instead of dark theme, change “MauryaDark” to “MauryaLight“.

Step 4: To make the window theme complaint, change it’s background color to following:

Background="{DynamicResource WindowBrush}"

You might also want to have a look at my other post where I explain how to add a theming infrastructure to a windows application.

[ddownload id=”2525″ style=”button” button=”black” text=”Download Theme”]

Total downloads: [ddownload_count id=”2525″]

File size: [ddownload_filesize id=”2525″]

1 thought on “Reusable themes for WPF application”

  1. When you add the design time rceuorses, Blend also adds a project reference to the project containing the resource dictionary. Does this reference only occur during design-time as well? In our project we don’t want our modules to reference the skin assemblies we want to load them dynamically based on some settings at runtime. I already have the mechanism in place to do the dynamic loading, but I am trying to figure out a way to see our styles applied during design, while still keeping the modules ignorant of the skins do you have any suggestions? Thanks!

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.