前提
・C#
・Visual Studio 2017
・Windowsデスクトップアプリ(WPFアプリ)
・UI用のライブラリとして MaterialDesignInXamlToolkit を使用しています
実現したいこと
現在App.xaml 内に MaterialDesignTheme.Defaults.xamlをResourceDictionary.MergedDictionariesとして取り込み、マテリアルなUIコンポーネントを使用しています。下記のようになっています。
<Application.Resources> <ResourceDictionary > <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" /> // ボタンやチェックボックス等のコントロール定義が含まれている <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" /> <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Blue.xaml" /> <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Indigo.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources>
ただ、特定の画面の特定のUIについてはデフォルトのもの(ライブラリが提供するものではないもの)を使用したいと思っています。
現状上のように設定しているので使用するUIコンポーネントはMaterialDesignInXamlToolkitで提供されるマテリアルなものになるのですが、xamlのStyleなどに値を設定して特定のUIコンポーネントではデフォルトのものを使用することはできますでしょうか?
ご教授頂けると幸いです。
回答1件
あなたの回答
tips
プレビュー