问题
I have a WPF application here with a lots of custom styles.
With Windows 7 or 8(.1) the applications looks very good. But if the application is started on Windows Server (2008 - 2012) the application looks like some of the styles did not load or some property's are not set.
I'm confused why this is happening, do I need to include some style information in my application which are present on Windows 7/8 but not on Windows Server
What I have done:
1. Installed Desktop Experience for server 2008 and it did not fix my problems. Still some of my custom styles are not loaded. For example I can't see my custom borders on the buttons.
2. Enabled & started the Themes Service (Like suggested in Toan Nguyen's answer). Unfortunately I can't change to areo theme via RDP
Here is a example screenshot. THis is not the only thing that is not displayed for Windows Server.
Left 2008 - Right Windows 8.1. To avoid confusion: The right one looks identical on Windows 7.
回答1:
the reason why the style wasn't applied for windows server 2003/2008 or XP because Aero theme is not available on those operation systems. To enable Aero theme on windows server 2008 you can follow this guide
回答2:
The server Operating System is developed with a objective of enhanced computation speed. When advanced themes such as Aero is installed into the system, the transparency and other features requires some amount of computation. In addition in stacked server environment most of the time the server is just called through remote desktop for some configuration modification or Log Viewing. Hence Microsoft doesn't install Desktop Experience feature by default. However if you wish to install you can install the Aero theme as the one in Windows 7.
However Windows Server 2008(R2) has been released before Windows 8, it doesn't have Windows 8 features by default. You can use some third party customization tools to make it look great :-)
Also see this link: http://social.technet.microsoft.com/Forums/windowsserver/en-US/7cce4d02-06cc-4dc0-96d6-fa63e0c9b368/configure-windows-server-2008-r2-to-get-win-7-experience?forum=windowsserver2008r2general
来源:https://stackoverflow.com/questions/21740220/styles-not-loading-on-windows-server