Search 
DailyCoding > Design

Add Vista Look to your WPF Control on Windows XP

Explains how to convert a XP looking UI into Vista look using WPF running under Window XP
Author admin on Jan 27, 2009 1 Comments
Rate it    (Rated 4 by 12 people)
3,212 Views

Vista had come with new and cool look & feel. If you want to add the Vista Aero style theme to you WPF application running on Window XP then it is very easy trick. You don’t need any third party library or tool to achieve this.

To do this all you need to do is to add following lines of xaml code into the designer of your window right after window tag:

<ResourceDictionary Source="/PresentationFramework.Aero, 
   Version=3.0.0.0, Culture=neutral, 
   PublicKeyToken=31bf3856ad364e35, 
   ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />

If you want to apply this look through out the application then add this to app.xaml under <Application.Resources> section.

Before Aero Theme

xp_default_theme

After Aero Theme

vista_aero_theme

The limitation of this technique is that it don't change the look of container form. You can see it still looks like a normal XP form.

Windows | WPF

Discussion

Visual C# Kicks On Feb 9, 2009 01:57 PM
Cool trick. Also if you add PresentationFramework.Aero as a reference you can shorten the code:

<ResourceDictionary Source="/PresentationFramework.Aero;component/themes/aero.normalcolor.xaml" />

Leave a Comment

Name
Email Address
Web Site
© Copyright 2008 Daily Coding • All rights reserved