This project is read-only.

DarkShinyGreen error

May 7, 2009 at 9:22 AM
I'm getting an error with DarkShinyGreen.

Unable to cast object of type 'System.Windows.Media.Color' to type 'System.Windows.Media.Brush'.

Even if I drop it on a web page as a window resource (with the name spaces on the window) I get this in the designer.  I'd be happy to troubleshoot this, but have no idea where to start.  It appears some value is a color and should be a brush, but I'm not real sure how to find that in the XAML.
May 7, 2009 at 9:45 AM
I think I may have found it, by just taking out one style at a time.



<Style TargetType="{x:Type Button}" BasedOn="{x:Null}">
Has a setter:




<Setter Property="Foreground" Value="{DynamicResource TextBrush}"/>

Apparently it wants a brush and TextBrush is a color, I added:




<SolidColorBrush x:Key="TextBrush2" Color="{StaticResource TextBrush}" />


After TextBrush and changed the line above to:
<Setter Property="Foreground" Value="{DynamicResource TextBrush2}"/>
 and it loads just fine now.  Not sure if anyone else is having this issue.