让 WPF 应用程序看起来像 Metro 风格,即使在 Windows 7 中?(窗口 Chrome/主题/主题)

Making WPF applications look Metro-styled, even in Windows 7? (Window Chrome / Theming / Theme)(让 WPF 应用程序看起来像 Metro 风格,即使在 Windows 7 中?(窗口 Chrome/主题/主题))
本文介绍了让 WPF 应用程序看起来像 Metro 风格,即使在 Windows 7 中?(窗口 Chrome/主题/主题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢新 Office 套件和 Visual Studio 上的窗口镶边:

I like the window chrome on the new Office Suite and Visual Studio:

当然,我仍在为 Windows 7 开发应用程序,但我想知道是否有一种快速简便的方法(阅读:WPF 样式或 Windows 库)来模拟这种样式.我过去做过一些窗口镶边样式,但让它看起来和表现得恰到好处真的很棘手.

I'm still developing applications for Windows 7 of course, but I'm wondering if there's a quick and easy way (read: WPF style or Windows Library) to emulate this style. I've done some window chrome styling in the past, but getting it to look and behave just right is really tricky.

有谁知道是否有现有的模板或库可以为我的 WPF 应用程序添加现代 UI"外观和感觉?

Does anyone know if there are existing templates or libraries to add a "Modern UI" look and feel to my WPF applications?

推荐答案

我最终选择的解决方案是 MahApps.Metro(github),其中(现在在两个软件上使用后)) 我认为这是一个出色的 UI 套件 (感谢 Oliver Vogel 建议).

The solution I ended up choosing was MahApps.Metro (github), which (after using it on two pieces of software now) I consider an excellent UI kit (credit to Oliver Vogel for the suggestion).

它只需要很少的努力就可以为应用程序设置皮肤,并且适应了标准的 Windows 8 控件.它非常强大.

It skins the application with very little effort required, and has adaptations of the standard Windows 8 controls. It's very robust.

Nuget 上有一个版本:

A version is available on Nuget:

您可以使用 GUI 通过 Nuget 安装 MahApps.Metro(右键单击您的项目,管理 Nuget 引用,搜索MahApps.Metro")或通过控制台:

You can install MahApps.Metro via Nuget using the GUI (right click on your project, Manage Nuget References, search for ‘MahApps.Metro’) or via the console:

PM> 安装包 MahApps.Metro

PM> Install-Package MahApps.Metro

它也是免费——即使用于商业用途.

It's also free -- even for commercial use.

我发现 Github 版本的 MahApps.Metro 包含当前 nuget 版本中不可用的控件和样式,包括:

I discovered that the Github version of MahApps.Metro is packed with controls and styles that aren't available in the current nuget version, including:

github 存储库非常活跃,有相当多的用户贡献.我建议检查一下.

The github repository is very active with quite a bit of user contributions. I recommend checking it out.

这篇关于让 WPF 应用程序看起来像 Metro 风格,即使在 Windows 7 中?(窗口 Chrome/主题/主题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
quot;Overflowquot; compiler error with -9223372036854775808L(编译器错误-9223372036854775808L(Q;溢出Q))
Visual Studio 2010 ReportViewer Assembly References(Visual Studio 2010 ReportViewer程序集引用)
Weird behaviour when I open a reportviewer in WPF(在WPF中打开报表查看器时出现奇怪的行为)
how do i pass parameters to aspnet reportviewer(如何将参数传递给aspnet report查看器)