安装 Material Design Themes

  • 通过 NuGet 包管理器搜索自动安装

  • 通过 NuGet 包管理器控制台手动安装

    Install-Package MaterialDesignThemes

配置 App.xaml

  • 主题

    • 对于 Light 主题(二选一):

      < ResourceDictionary  Source = “ pack:// application:,,, / MaterialDesignThemes.Wpf; component / Themes / MaterialDesignTheme.Light.xaml ” />
    • 对于 Dark 主题(二选一):

      < ResourceDictionary  Source = “ pack:// application:,,, / MaterialDesignThemes.Wpf; component / Themes / MaterialDesignTheme.Dark.xaml ” />
    • 默认

      < ResourceDictionary  Source = “ pack:// application:,,, / MaterialDesignThemes.Wpf; component / Themes / MaterialDesignTheme.Defaults.xaml ” />
  • 颜色

    < ResourceDictionary  Source = “ pack:// application:,,, / MaterialDesignColors; component / Themes / Recommended / Primary / MaterialDesignColor.COLOR_NAME.xaml ” />
    < ResourceDictionary Source = “ pack:// application:,,, / MaterialDesignColors; component / Themes / Recommended / Accent / MaterialDesignColor.COLOR_NAME.xaml ” />

配置窗体

  • 基础配置

    <Window [...]
    TextElement.Foreground="{DynamicResource MaterialDesignBody}"
    Background="{DynamicResource MaterialDesignPaper}"
    [...] >
  • 完整配置

    <Window [...]
    TextElement.Foreground="{DynamicResource MaterialDesignBody}"
    Background="{DynamicResource MaterialDesignPaper}"
    TextElement.FontWeight="Medium"
    TextElement.FontSize="14"
    FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
    [...] >

最新文章

  1. css(二)
  2. Django HTML 显示文章摘要
  3. C++11之thread线程
  4. 牢骚与javascript中的this
  5. phpcms 04
  6. [SAP ABAP开发技术总结]增强Enhancement
  7. iOS 国际化
  8. 第03篇. 标准Web项目Jetty9内嵌API简单启动
  9. java学习系列(一)Java中的IO操作
  10. PHP缓存技术的多种方法小结
  11. Centos7下用FastDFS搭建图片服务器
  12. 前端js日期时间格式转换
  13. RabbitMQ持久化
  14. windows生成当前目录树
  15. java 遍历Map的4种方法
  16. [Vijos 1676] 陶陶吃苹果
  17. php reids 单机命令
  18. ES6-循环
  19. Python 模块 re (Regular Expression)
  20. GraphicsMagick 1.3.25 Linux安装部署

热门文章

  1. Stanford Log-linear Part-Of-Speech Tagger标记含义
  2. The Quantum L3 router and floating IPs
  3. R语言编程中的常见错误
  4. MyEclipse消除frame引起的the file xxx cannot be found
  5. UI层自动化测试介绍
  6. MessFormat的简单使用
  7. MySQL--开发技巧(一)
  8. hdu--2570--迷瘴(贪心)
  9. BEC listen and translation exercise 34
  10. Arc082_F Sandglass