WPF 的 Metro 风格主题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3458382/
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
Metro-like theme for WPF
提问by Guilherme Defreitas
I would like to know where i can get the theme that looks like Zune application for Windows (or MetroTwit) for WPF.
我想知道在哪里可以获得看起来像 WPF 的 Windows(或 MetroTwit)的 Zune 应用程序的主题。
I google it but i only get the theme for Silverlight 4, not WPF.
我用谷歌搜索,但我只得到 Silverlight 4 的主题,而不是 WPF。
回答by Paul Jenkins
Resurrecting a dead post, perhaps, self promoting? More than certain, however, I've (relatively recently) started a Metro theme pack largely based on stuff I've created in MahTweets and from the Silverlight Cosmopolitan theme pack specifically for WPF
复活一个死帖,也许是自我推销?然而,更确定的是,我(相对最近)开始了一个 Metro 主题包,主要基于我在 MahTweets 和 Silverlight Cosmopolitan 主题包中创建的内容,专门用于WPF
https://github.com/MahApps/MahApps.Metro
https://github.com/MahApps/MahApps.Metro
Usage is simple, just
用法很简单,只要
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
There are some caveats over the way WPF handles theming from other assemblies that you will have to look into.
WPF 处理来自其他程序集的主题的方式有一些注意事项,您将不得不研究。
It's free, open source and would love further contributions if others are looking for this sort of thing in WPF.
它是免费的、开源的,如果其他人正在 WPF 中寻找这种东西,它会喜欢进一步的贡献。