{"id":259,"date":"2011-10-24T18:02:38","date_gmt":"2011-10-24T07:02:38","guid":{"rendered":"http:\/\/blog.quppa.net\/2011\/10\/24\/theming-visual-styles-in-windows-8\/"},"modified":"2011-10-24T18:02:38","modified_gmt":"2011-10-24T07:02:38","slug":"theming-visual-styles-in-windows-8","status":"publish","type":"post","link":"https:\/\/www.quppa.net\/blog\/2011\/10\/24\/theming-visual-styles-in-windows-8\/","title":{"rendered":"Theming &#038; Visual Styles in Windows 8"},"content":{"rendered":"<p><em>The following is based on the <a title=\"Windows 8 Developer Preview downloads\" href=\"http:\/\/msdn.microsoft.com\/en-us\/windows\/apps\/br229516\">Windows Developer Preview<\/a> and might not accurately represent the final version of Windows 8.<\/em><\/p>\n<p>A <a title=\"MSDN: Visual Styles - What&#39;s New for Windows 8\" href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/hh404286(v=VS.85).aspx\">significant change in Windows 8<\/a> is the removal of support for Windows classic theming. In the Windows Developer Preview, there is no Windows Classic theme, and all themes (including Windows Basic and the four high contrast themes) use the <a title=\"MSDN: Desktop Window Manager\" href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/aa969540(v=vs.85).aspx\">Desktop Window Manager (DWM)<\/a> for desktop composition (in Windows Vista and Windows 7, it was only enabled for Aero themes).<\/p>\n<p>While some users may miss the Windows Classic theme (it might return in later builds, of course), this is definitely a positive development. All themes will receive the benefits of hardware acceleration, and there will no longer be the need to maintain a separate code path for when the DWM is disabled (as long as the program targets only Windows 8 or later).<\/p>\n<p>In order to maintain compatibility with earlier versions of Windows, when a high contrast theme is selected, Windows 8 will simulate the Windows classic theming model unless an application specifies Windows 8 as a supported OS in its application manifest. The sample program I made for the <a title=\"Quppa&#39;s Blog: Windows Theme Fonts Redux &amp; Sample Code\" href=\"https:\/\/www.quppa.net\/blog\/2011\/10\/24\/windows-theme-fonts-redux-sample-code\/\">previous post<\/a> did not include such a manifest, so it doesn\u2019t work correctly in the Windows Developer Preview with high contrast themes:<img loading=\"lazy\" decoding=\"async\" style=\"margin: 5px auto; border: 0px currentcolor; float: none; display: block; background-image: none;\" title=\"WPF sample without manifest\" border=\"0\" alt=\"WPF sample without manifest\" src=\"https:\/\/www.quppa.net\/blog\/wp-content\/uploads\/WPFSampleHighContrast1WithoutManifest.png\" width=\"201\" height=\"232\" \/><\/p>\n<p>Compare this to a task dialog:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"margin: 5px auto; border: 0px currentcolor; float: none; display: block; background-image: none;\" title=\"Task Dialog (High Contrast #1)\" border=\"0\" alt=\"Task Dialog (High Contrast #1)\" src=\"https:\/\/www.quppa.net\/blog\/wp-content\/uploads\/TaskDialogHighContrast1.png\" width=\"396\" height=\"172\" \/><\/p>\n<p>(The button in the WPF window is also drawn incorrectly, but presumably that will be fixed in .NET 4.5.)<\/p>\n<p>Adding the appropriate manifest to the application causes it to work as it should:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"margin: 5px auto; border: 0px currentcolor; float: none; display: block; background-image: none;\" title=\"WPF sample with manifest\" border=\"0\" alt=\"WPF sample with manifest\" src=\"https:\/\/www.quppa.net\/blog\/wp-content\/uploads\/WPFSampleHighContrast1WithManifest.png\" width=\"201\" height=\"233\" \/><\/p>\n<p>I\u2019ve updated the sample code in the <a title=\"Quppa&#39;s Blog: Windows Theme Fonts Redux &amp; Sample Code\" href=\"https:\/\/www.quppa.net\/blog\/2011\/10\/24\/windows-theme-fonts-redux-sample-code\/\">previous post<\/a> to include the manifest file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following is based on the Windows Developer Preview and might not accurately represent the final version of Windows 8. A significant change in Windows 8 is the removal of support for Windows classic theming. In the Windows Developer Preview, there is no Windows Classic theme, and all themes (including Windows Basic and the four &hellip; <a href=\"https:\/\/www.quppa.net\/blog\/2011\/10\/24\/theming-visual-styles-in-windows-8\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Theming &#038; Visual Styles in Windows 8&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,9],"tags":[50,56,72,148,156,160,164,165,166,174,185],"class_list":["post-259","post","type-post","status-publish","format-standard","hentry","category-programming","category-windows","tag-dwm","tag-fonts","tag-interop","tag-themes","tag-ui","tag-uxtheme","tag-visual-styles","tag-vsstyle","tag-vssym32","tag-windows-8","tag-wpf"],"_links":{"self":[{"href":"https:\/\/www.quppa.net\/blog\/wp-json\/wp\/v2\/posts\/259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quppa.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quppa.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quppa.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quppa.net\/blog\/wp-json\/wp\/v2\/comments?post=259"}],"version-history":[{"count":0,"href":"https:\/\/www.quppa.net\/blog\/wp-json\/wp\/v2\/posts\/259\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.quppa.net\/blog\/wp-json\/wp\/v2\/media?parent=259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quppa.net\/blog\/wp-json\/wp\/v2\/categories?post=259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quppa.net\/blog\/wp-json\/wp\/v2\/tags?post=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}