简体   繁体   English

Windows Server 2008 R2上的WPF样式

[英]WPF styling on Windows Server 2008 R2

I have a WPF program that is styled quite differently on Windows 8.1 vs Windows Server 20008 R2. 我有一个WPF程序,在Windows 8.1和Windows Server 20008 R2上的风格完全不同。 The image below shows a sample from each OS (Windows 8 on the left, Server 2008 R2 on the right). 下图显示了每个操作系统的示例(左侧是Windows 8,右侧是Server 2008 R2)。

The program is built using the .NET Framework 4.5. 该程序使用.NET Framework 4.5构建。 I looked at the installed frameworks on each machine and they are as follows: 我查看了每台机器上安装的框架,它们如下:

Windows 8.1: Windows 8.1:

  • .NET Framework 4 Multi-Targeting Pack .NET Framework 4多目标包
  • .NET Framework 4.5 Multi-Targeting Pack .NET Framework 4.5多目标包
  • .NET Framework 4.5 SDK .NET Framework 4.5 SDK
  • .NET Framework 4.5.1 Multi-Targeting Pack .NET Framework 4.5.1多目标包
  • .NET Framework 4.5.1 Multi-Targeting Pack (ENU) .NET Framework 4.5.1多目标包(ENU)
  • .NET Framework 4.5.1 SDK .NET Framework 4.5.1 SDK

Windows Server 2008 R2: Windows Server 2008 R2:

  • .NET Framework 4 Multi-Targeting Pack .NET Framework 4多目标包
  • .NET Framework 4.5.1 .NET Framework 4.5.1

What is it that drives the appearance of the application and is there a way to get the program on Server 2008 R2 to look more like the program on Windows 8.1? 什么驱动应用程序的外观,有没有办法使Server 2008 R2上的程序看起来更像Windows 8.1上的程序? While everything is working correctly on Server 2008 R2 it would be nice to have it look more like the Windows 8.1 image. 虽然在Server 2008 R2上一切正常,但让它看起来更像Windows 8.1图像会很不错。

在此输入图像描述

             Windows 8.1                                 Windows Server 2008 R2

I believe your issue is due to Aero not being enabled on Windows Server 2008 by default. 我相信您的问题是由于默认情况下未在Windows Server 2008上启用Aero。 This link Enable Aero shows how to enable the Aero (and other desktop enhancements) on Windows Server 2008, I assume the same process can be used for Windows Server 2008 R2. 此链接Enable Aero显示了如何在Windows Server 2008上启用Aero(以及其他桌面增强功能),我假设可以将相同的过程用于Windows Server 2008 R2。

This is turned off by default, I believe, as the user experience on a server is designed to be different to that of a workstation. 默认情况下,这是关闭的,因为服务器上的用户体验设计与工作站的用户体验不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM