如何为您的 WPF 应用程序提供平面 (Windows 8) 类型的 UI 外观?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27160900/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to give your WPF application a flat (Windows 8) type of UI look?
提问by Mehrad
I am not a big fan of Windows 8itself but I quite like the new look of it and it's new companion Windows 10.
我不是Windows 8本身的忠实粉丝,但我非常喜欢它的新外观,它是Windows 10的新伴侣。
Is there a simple change that I can do or a different standard component bank that I can use to give my WPFapplication a flat, and non 3D look using the following?
是否有我可以做的简单更改或不同的标准组件库,我可以使用以下内容为我的WPF应用程序提供平面和非 3D 外观?
- Developing a WPF in Visual Studio 2013
- Under Windows 7
- 在 Visual Studio 2013 中开发 WPF
- 在 Windows 7 下
Obviously without going into a trouble of changing a template for each component or use 3rd party collections.
显然,无需为每个组件更改模板或使用 3rd 方集合而遇到麻烦。
PS: Is there a specific name for such a User Interface?
PS:这样的用户界面有特定的名称吗?
Examples
例子
I can mention the new CCleanerinterface in the latest update:
我可以在最新的更新中提到新的CCleaner界面:


Or UI's such as the one below in this article
或者像本文下面的 UI


采纳答案by BradleyDotNET
There is no built in way to do this.
没有内置的方法可以做到这一点。
If you want the "App" look, There is the M:UI open source project (disclaimer, I've heard it has some bugs): https://mui.codeplex.com/
如果你想要“应用程序”的外观,有 M:UI 开源项目(免责声明,我听说它有一些错误):https: //mui.codeplex.com/
The look itself is called "Modern UI".
外观本身被称为“现代用户界面”。
Your second graphic isstandard WPF, just run in Windows 8. Clearly the default styling changed between the two. If thats what you are looking for, you will likely need to generate your own styles.
你的第二个图形是标准的 WPF,只是在 Windows 8 中运行。显然,两者之间的默认样式发生了变化。如果这就是您要找的东西,您可能需要生成自己的样式。
Related: Making WPF applications look Metro-styled, even in Windows 7? (Window Chrome / Theming / Theme)
回答by Rahul
Try Mahapps Metro. It's very pupular opensource metro-ui library.
试试Mahapps 地铁。这是一个非常受欢迎的开源 Metro-ui 库。

