Monday 21 November 2011

Themes in WPF

Introduction

This article will follow soon...

How to use specific Windows theme in a WPF application

WPF includes all common Windows themes. By default WPF loads the current Windows theme as your default style-set. But you can override these styles by loading a specific theme. To do this you first have to add an reference to the style assembly you like to use and second you need to merge the theme resource dictionary into your app resources. This overrides the default style-set that has been loaded by WPF.
The following exmple shows how to load the Windows Vista Aero theme.
<App.Resources>
    <ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0,
           Culture=neutral, PublicKeyToken=31bf3856ad364e35,
           ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />
</App.Resources>
 

No comments:

Post a Comment