version 2.6.0 The value "MaterialDesignThemes.Wpf.CustomColorTheme" is not of type "System.Windows.ResourceDictionary"
See original GitHub issue<Application x:Class="DR_SORES.App" StartupUri="Authenticate_Window.xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <materialDesign:CustomColorTheme BaseTheme="Light" Primary="Aqua" Secondary="DarkGreen" /> <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application>
is throwing
Severity Code Description Project File Line Source Suppression State Error The value “MaterialDesignThemes.Wpf.CustomColorTheme” is not of type “System.Windows.ResourceDictionary” and cannot be used in this generic collection. Parameter name: value DR_SORES App.xaml 8 IntelliSense
I have installed version 2.6.0. Same issue with .net 4.5.2 and 4.6.1, well, with every version.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (8 by maintainers)
I am on visual studio 2017 no resharper. Program debugs and runs, but as @Awsmolak wrote, I am having same issues “Cannot find resource named …” I am using
<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.Teal.xaml" />
for now, till it gets fixed@Taschenbuch ah I see the problem I forgot to move this issue into the 3.0.0 milestone. The fix for this is going out in the next release. You can also download the preview 3.0.0 NuGet packages if you need the fix right away.