WPF 的 Metro 风格主题 [英] Metro-like theme for WPF

查看:15
本文介绍了WPF 的 Metro 风格主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在哪里可以获得看起来像 WPF 的 Windows 版 Zune 应用程序(或 MetroTwit)的主题.

I would like to know where i can get the theme that looks like Zune application for Windows (or MetroTwit) for WPF.

我用谷歌搜索,但我只得到 Silverlight 4 的主题,而不是 WPF.

I google it but i only get the theme for Silverlight 4, not WPF.

推荐答案

复活一个死帖,也许是自我推销?然而,更确定的是,我(相对最近)开始了一个 Metro 主题包,主要基于我在 MahTweets 和 Silverlight Cosmopolitan 主题包中创建的内容,专门用于 WPF

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

https://github.com/MahApps/MahApps.Metro

使用很简单,只需

<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>

WPF 处理来自其他程序集的主题的方式有一些注意事项,您必须研究一下.

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 的 Metro 风格主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆