WPF applications are styled by default to match the current Windows theme. If you want your application to use another Windows theme, simply override the default theme in the App.xaml file of your project.
This is what a simple application window looks like by default on Windows 8:
In order to override the look of your application so that it resembles the Windows 7 theme, simply change your App.xaml to add this to your Application.Resources section:
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source = "/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Next, add a reference to the PresentationFramework dll from the Solution Explorer (right click on references):
Select the PresentationFramework.Aero dll from the list:
Run your application.
Your application will now look like this:
The downside is that the window (border) does not seem to be affected by this.
The other Windows themes can also be selected (Eg: Luna). Just select the appropriate dll reference and update the code highlighted in red above to match it. The other options can be seen in the image showing the selection of the reference to be added.
This is what a simple application window looks like by default on Windows 8:
In order to override the look of your application so that it resembles the Windows 7 theme, simply change your App.xaml to add this to your Application.Resources section:
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source = "/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Next, add a reference to the PresentationFramework dll from the Solution Explorer (right click on references):
Select the PresentationFramework.Aero dll from the list:
Run your application.
Your application will now look like this:
The downside is that the window (border) does not seem to be affected by this.
The other Windows themes can also be selected (Eg: Luna). Just select the appropriate dll reference and update the code highlighted in red above to match it. The other options can be seen in the image showing the selection of the reference to be added.