首页 > 解决方案 > 同时使用 Material Design 和 Caliburn.Micro

问题描述

我使用 WPF 和 C#。我想在 Visual Studio 的一个解决方案中同时使用:MaterialDesignCaliburn.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>

标签: c#wpfvisual-studiomaterial-designcaliburn.micro

解决方案


推荐阅读