c# - 同时使用 Material Design 和 Caliburn.Micro
问题描述
我使用 WPF 和 C#。我想在 Visual Studio 的一个解决方案中同时使用:MaterialDesign
Caliburn.Micro v4.0173。我尝试将它们都添加到 App.xaml,但 materialDesign 不起作用。所以控件的视图和我没有安装materialDesign一样。
<Application x:Class="WPFUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WPFUI">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<local:Bootstrapper x:Key="Bootstrapper"/>
<ResourceDictionary x:Key="MD1" Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
<ResourceDictionary x:Key="MD2" Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary x:Key="MD3" Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.BlueGrey.xaml" />
<ResourceDictionary x:Key="MD4" Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
<ResourceDictionary x:Key="MD5" Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.DataGrid.ComboBox.xaml" />
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
解决方案
推荐阅读
- swift - AVSpeechSynthesizer 在 200 次通话后停止工作
- node.js - NodeJS日期添加月份创建无限循环
- mongodb - 批量 upsert 优化 mongoDB
- mongodb - mongodb保存在数组中不是对象
- javascript - 如何在firebase中查询事务内的子集合?
- reactjs - 在反应子组件中使用formik
- php - 获取具有不同键的两个集合之间的差异
- r - 如何矢量化这个双 for 循环?
- istio - Envoy 代理中的断路器模式
- python - FERNET 错误:cryptography.fernet.InvalidToken