question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
tomasfilcommented, Aug 8, 2019

One final question what version of visual studio are you running (Help>>About Microsoft Visual Studio)? I am currently on Visual Studio 2019 version 16.1.4

I am not able to reproduce this one my environment, but I am noticing a couple of thing.

  1. This is an intellisense error not actually a run-time issue. Correct me if I am wrong, but I suspect your app should launch and work correctly.
  2. I also have ReSharper installed which I know affects the intellisense. Are you running any tools like this?

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

0reactions
Keboocommented, Sep 20, 2019

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - WPF application error 'Set property 'System.Windows. ...
I had the same issue, I had to add this itemGroup to the .csproj of the project <ItemGroup> <PackageReference Include="MaterialDesignThemes.
Read more >
Untitled
Wpf material design resource dictionary ResourceDictionary and XAML resource ... Wpf.CustomColorTheme" is not of type "System.Windows.ResourceDictionary" ...
Read more >
ResourceDictionary and XAML resource references
Explains how to define a ResourceDictionary element and keyed resources, ... In this case, the key is the actual Type object, not a...
Read more >
5 Steps to Getting Started With Material Design In XAML
Material Design In XAML (MDIX) is a beautiful theme library that brings Google's Material Design to your Windows Presentation Framework (WPF) applications.
Read more >
GitHub Integration cause errors - TeamExplorer Window
After installing git extensions the integration with BitBucket Server is broken. Basically here is the stacktrace of an exception that are seen upon...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found