开发者

How to make a WPF application the same in both Windows classic style and windows XP style?

I have written a app in WPF. And I am using standard BlueTheme available on microsoft website for my application. The application looks great in Windows XP which is having Windows XP style. In the screenshot below we can see the buttons with round edges and evrything.

开发者_StackOverflow社区

Screenshot 1 (Windows XP style):

How to make a WPF application the same in both Windows classic style and windows XP style?

I then right clciked on my desktop and went to appearance and chose windows classic style. Then the application looks crap. All the buttons are now having square edges.

Screenshot 2 (Windows classic style):

How to make a WPF application the same in both Windows classic style and windows XP style?

I think searched in internet and people had suggested to include PresentationFramework.Aero theme. But still the problem persists.

[Edits] I have added the below line. Still it doesn't work !

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

My question is How to make a WPF application the same in both Windows classic style and windows XP style ?


Put this into your Window/Application resources:

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

It will enable Aero style with other Windows themes (XP/Classic).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜