Using Vista Aero theme in XP WPF apps

I found this article on the web recently which shows how to use the Vista Aero theme on XP in your WPF apps.

I found two things:
01: It is less complicated that the article states.
02: It is a bit different if you already have stuff in your app resources, such as styles or control templates etc.

So here are my steps
01: Add PresentationFramework.Aero to your applications References list. It is listed in the [.NET] tab.
02: Edit your App.xaml and change it from this

<Application.Resources>
  <!– Your stuff here –>
</Application.Resources>

to this

<Application.Resources>
  <ResourceDictionary>
    <!– Put your stuff here instead –>

    <ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source=”/PresentationFramework.Aero;component/themes/aero.normalcolor.xaml”/>
    </ResourceDictionary.MergedDictionaries>
  </ResourceDictionary>
</Application.Resources>

One thought on “Using Vista Aero theme in XP WPF apps

Leave a Reply

Your email address will not be published. Required fields are marked *