I am trying to make a simple resource dictionary for styles but the Background property is throwing an “Invalid Token”. Setting the background directly in the property works fine. Here is an example using a button style:
<Style x:Key="ExampleButton"
TargetType="{x:Type Button}">
<Setter Property="Background"
Value="DarkGrey" />
<Setter Property="Width"
Value="100" />
<Setter Property="Height"
Value="30" />
<Style.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Background"
Value="Grey" />
</Trigger>
</Style.Triggers>
</Style>
i think the value need to be Value=”Gray” and not Value=”Grey”
or try to set your own “Shade of Gray”, Value=”#B2AFAF”