未在 Windows Server 上加载样式 [英] Styles not loading on Windows Server
问题描述
我在这里有一个 WPF 应用程序,其中包含许多自定义样式.
I have a WPF application here with a lots of custom styles.
使用 Windows 7 或 8(.1) 时,应用程序看起来非常好.但是如果应用程序在 Windows Server (2008 - 2012) 上启动,应用程序看起来有些样式没有加载或某些属性没有设置.
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.
我很困惑为什么会发生这种情况,我是否需要在我的应用程序中包含一些样式信息,这些信息存在于 Windows 7/8 但不在 Windows Server 上
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
我做了什么:
1.为 server 2008 安装了桌面体验,但它没有解决我的问题.仍然没有加载我的一些自定义样式.例如,我看不到按钮上的自定义边框.
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.启用 &启动主题服务(就像 Toan Nguyen 的回答中所建议的那样).不幸的是,我无法通过 RDP 更改为 areo 主题
2. Enabled & started the Themes Service (Like suggested in Toan Nguyen's answer). Unfortunately I can't change to areo theme via RDP
这是一个示例屏幕截图.这不是 Windows Server 不显示的唯一内容.
Here is a example screenshot. THis is not the only thing that is not displayed for Windows Server.
左 2008 - 右 Windows 8.1.为避免混淆:正确的在 Windows 7 上看起来是一样的.
Left 2008 - Right Windows 8.1. To avoid confusion: The right one looks identical on Windows 7.
推荐答案
Windows Server 2003/2008 或 XP 没有应用该样式的原因是因为 Aero 主题在这些操作系统上不可用.要在 Windows Server 2008 上启用 Aero 主题,您可以按照 本指南
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
这篇关于未在 Windows Server 上加载样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!