Partilhar via


Vista look on Non-Aero themes

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

Comments

  • Anonymous
    December 13, 2006
    You've been kicked (a good thing) - Trackback from DotNetKicks.com

  • Anonymous
    December 14, 2006
    Ok... but where can we download the DLL "presentationframework.aero.dll" I m under XP and cannot find this DLL :-(

  • Anonymous
    December 14, 2006
    You need to install .net 3.0 , which includes wpf

  • Anonymous
    December 15, 2006
    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

  • Anonymous
    December 17, 2006
    the tag is sufficient :)

  • Anonymous
    December 21, 2006
    The comment has been removed

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

  • Anonymous
    December 22, 2006
    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 :)

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

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