Lester's WPF\SL Blog

Simple, Easy & Beautiful

Vista look on Non-Aero themes

Vista look on Non-Aero themes

  • Comments 10

the look of apps created on vista is kewl and it would be nice to have the same aero theme as default when apps are run on other themes ... the way to do this is to specify the theme at the root. So it would look something like this.

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

Bear in mind that the syntax uses a strong name URI. This is because the app fails to load the assembly from the GAC; the CLR does not support loading dlls with a partial name from the GAC.

To get the Version, Culture and PulblicKeyToken right go to \windows\assembly and check the values for the corresponding dll.

With the above syntax you can now build apps which look like the media player 11 on XP... have fun coding.

 

Share this post: Email | Digg! | del.icio.us | Reddit | Kick It | Live Favorites

  • You've been kicked (a good thing) - Trackback from DotNetKicks.com

  • Ok... but where can we download the DLL "presentationframework.aero.dll"

    I m under XP and cannot find this DLL :-(

  • You need to install .net 3.0 , which includes wpf

  • Should I set any other things to get Aero theme on my Win XP? something like setting styles? Or is this tag enough?

    Thanks in Advance

  • the tag is sufficient :)

  • I've tested this, but the results is not here, I work with .NET 3 RTM, VS 2005 Team Suite and extension for WPF/WCF on Windows XP Pro SP2, I've test this piece of code :

    "<Window x:Class="avirer.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="WPFTestThemes" Height="300" Width="300">

    <Window.Resources>

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

    </Window.Resources>

    <Grid>

    <Button Content="Hello" HorizontalAlignment="Center" VerticalAlignment="Center" />

    </Grid>

    </Window>

    "

    and the look of vista is not here :( here is a screenshot :

    http://medias.neldim.fr/shot1.png

    The toolbar is not the same as Windows media player 11 :(

    Can someone help me please ?

    Regards

    David

  • Si vous avez déjà regardé Windows Media Player 11 sur Windows XP, vous avez sans doute remarquez ce look

  • check out if the public key token matches in the GAC... if you are still facing problems post your question on the WPF forum. you will surely be answered :)

  • Вводное руководство по WPF - Часть I (XAML) Вводное руководство по WPF - Часть II (Layout) Вводное руководство

  • Вводное руководство по WPF - Часть I (XAML) Вводное руководство по WPF - Часть II (Layout) Вводное руководство

Page 1 of 1 (10 items)