How can I not specify a theme for WPF and use the theme of the main OS?

Is it possible not to specify a theme for WPF at all and just use the default OS that uses it? For this reason, I am still not indifferent to Winforms. WinForm applications feel like professionals, light up its legs and part of the operating system, while a WPF application, including VS 2010, feels hard. In addition, WPF applications are visually incompatible. They are similar to web pages where each developer decides what size control should be, and not leave it to the user and the operating system. I prefer to follow the recommendations.

+5
source share
1 answer

By default, WPF will request system settings to determine which Windows theme has been selected. He will then use the WPF theme, which should exactly match the system setup. This will provide styles for properties such as colors and patterns for a general look (including animation). WPF themes include styles for all built-in controls.

Keep in mind, unlike WinForms, all WPF elements are created in WPF. In WinForms, most controls were created using pInvoke and derived from unmanaged code.

WinForms can guarantee the same appearance as the OS, since the control comes from the OS. Although this was a good side effect, the downside was that you were limited in your ability to interact, expand, or change the appearance of the controls.

WPF, Windows, :

Windows Vista: themes\Aero.NormalColor.xaml
Windows XP: themes\Luna.NormalColor.xaml
Olive Green Windows XP: themes\Luna.Homestead.xaml
Silver Windows XP: themes\Luna.Metallic.xaml
Windows XP Media Center Edition 2005 and XP Tablet PC Edition 2005: themes\Royale.NormalColor.xaml
Windows Classic: themes\Classic.xaml
+1

All Articles