Follow me on twitter @yodasmydad
Ahhhh #Fringe can't finish like that!! Latest Tweet:

Hey I'm Lee. My blog was put up to house my strange thoughts, ramblings, nuggets of information I can refer back to and document my learning curves on new dev stuff like Umbraco v5 and other .NET related things.

All thoughts and comments on here are my own, and in no way reflect my employer - I also take no responsibility for spelling, grammar or terminology, so read at your own risk!

Blogs I Read

Sites I Like

Beginners Guide To Using WPF Themes

If you are completely new to WPF & XAML like I am, then trying to style your UI in XAML can be a little frustrating especially if in your head you have how you want it to look.

I spent ages looking around the internet for styles I could use which would get me off on the right foot, then stumbled on WPF Themes on CodePlex (http://wpfthemes.codeplex.com) which has a really nice set of themes including ones from the Silverlight Toolkit and a few other nice ones.

WPFThemesV2

The whistler blue was very close to what I wanted for my UI, so I thought I would download it and install it… Yes sounds simple, but… No download link on the project… It did have code check-ins and I happened to notice the word NuGet in the comments.

So I fired up NuGet and lone behold WPF Themes is listed (Gotta love NuGet!), so I installed it hopped back over to CodePlex to find out how the heck I apply / use these themes… Clicked the documentation tab… And nothing.  Rather frustrating especially when you are a COMPLETE WPF NEWB!

After tinkering and Googling around most of the day I have figured it out, so to save other newbies going through the same circle I went in - To use WPF Themes do the following

  1. Install it via NuGet (This will add a reference to WPF.Themes in your solution)
  2. Open up your MainWindow.xaml and add in a using statement to the WPFThemes

    using WPF.Themes;
    
  3. Choose the theme you want and you call it like so after the InitializeComponent(); method

    this.ApplyTheme("WhistlerBlue");
    

Here is a list of all the themes and you just replace the name with the one you want to use

  • ExpressionDark
  • ExpressionLight
  • Rainier
  • RainierPurple
  • RainierOrange
  • RainierRadialBlue
  • Shiny
  • ShinyDarkGreen
  • ShinyDarkTeal
  • ShinyDarkPurple
  • ShinyBlue
  • ShinyRed
  • Bureau
  • BureauBlack
  • BureauBlue
  • Whistler
  • WhistlerBlue
  • DavesGlossyControls
  • DavesGlossyControls
  • UXMusing
  • UXMusingRed
  • UXMusingGreen
  • UXMusingRough
  • UXMusingRoughGreen
  • UXMusingRoughRed
  • UXMusingBubbly
  • UXMusingBubblyBlue

I haven't created another page/window yet in this WPF app, but would suspect you need to do the above for each new one you create - But don't quote me on that!

Back to top