MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
Unable to cast object of type 'Mocks.MaterialDesignDemo_ColorToolViewModel_2_47133230' to type 'System.Windows.Media.SolidColorBrush'.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 16.3k
- Forks
- 3.5k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 8
Description
Hi
After downloading the source code, I installed .netcore3.0 and .net 4.7.2. After running with vs2019, the demo can run normally but the WPF view page is prompted to report an error. The screenshot is as follows. What is the reason? Is there a library missing?
Error message
Unable to cast object of type 'Mocks.MaterialDesignDemo_ColorToolViewModel_2_47133230' to type 'System.Windows.Media.SolidColorBrush'. MaterialDesignDemo ColorTool.xaml 1

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the WPF demo in VS2019 with the reported .NET Core 3.0 and .NET Framework 4.7.2 setup, then start at ColorTool.xaml and inspect the value involved in the reported SolidColorBrush cast. Done means the WPF view opens without the exception and the cause is identified rather than attributed to a missing library without evidence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100