views:

99

answers:

2

I have a relativly simple question that I can't seem to figure out. I have downloaded some theme files in an XAML format off the internet and I would like to use them as my themes in my WPF application. How do you do this? All help is appreciated!

+1  A: 

You can put the elements in App.xaml, and they'll automatically trickle down. This can either be done directly (copy and paste), or via a merged resource dictionary, where app.xaml just references the .xaml file(s) of your theme.

Reed Copsey
+2  A: 

Add the theme.xaml file to your project(right click->Add Existing Item...). Then in your App.xaml file add the following code

<Application.Resources>
<ResourceDictionary Source="ThemeFile.xaml" />
</Application.Resources>

Replacing ThemeFile.xaml with the name of the theme file you wish to use.

Silv3rSurf
When I ran the program after the changes, there seemed to be not changes to what i had originally
muckdog12
use DynamicResource instead of StaticResource
Kishore Kumar