How to invoke windows theme in WPF?

前端 未结 1 2039
刺人心
刺人心 2021-01-03 15:05

Hi Folks I am trying to invoke the current theme of windows for my elements in WPF 3.5.

as the user change the window theme my application should also be changed acc

相关标签:
1条回答
  • 2021-01-03 15:16

    You can define a different look and feel based on the desktop theme by adding a resource dictionary to the Themes folder. The desktop theme determine which resource dictionary is used. Here is a list the resource dictionary file names and the desktop themes:

    1. Classic.xaml – “Classic” Windows 9x/2000 look on Windows XP.
    2. Luna.NormalColor.xaml – Default blue theme on Windows XP.
    3. Luna.Homestead.xaml – Olive theme on Windows XP.
    4. Luna.Metallic.xaml – Silver theme on Windows XP.
    5. Royale.NormalColor.xaml – Default theme on Windows XP Media Center Edition.
    6. Zune.NormalColor.xaml – Default theme on Windows XP Zune.
    7. Aero.NormalColor.xaml – Default theme on Windows Vista ...

    You can read details there (http://blogs.msdn.com/wpfsdk/archive/2007/07/31/using-themes-with-custom-controls.aspx)

    0 讨论(0)
提交回复
热议问题