So I am looking around for some ideas on making this WPF based application for Windows that I am working on look slightly less sucky. And I see some nifty themes on this web page:
And I am thinking that would be pretty cool to just swap in one line in the App.xaml file, and my whole app would look different.
Cool in theory, but some implementation details are a bit fuzzy.
Here is what I did to get it working with VS 2010 Ultimate:
- Install the WPF Toolkit by clicking on the big purple “download” button on the above web site
- Download the themes xaml files by going to this web site: WP Futures (scroll down to WP Themes and click the link to download the zip file)
- Unzip the downloaded file and add the needed xaml files to your WPF project
- Add a reference to WPF Toolkit in your application’s References folder
- Add a ResourceDictionary line to the Application.Resources section of your App.xaml file to make it look like the one shown on the WPF Themes page above
Keep in mind that if you put your xaml theme files in a folder off the root of your project, you will need to adjust the Source property of the ResourceDictionary. For example, I put the xaml theme files in a Themes folder off the root of the project, so the Source for me looks like this:
BTW, Happy Birthday to John Petrucci, who is quite clearly not a native of this planet.