this is my style:
<Style x:Key="someStyle" TargetType="{x:Type Border}">
<Setter Property="Control.Background" Value="#BB252525"/>
</Style>
That code works fine but I actually need to bind the background color to this resource:
<Color x:Key="MenuBackground">#BB252525</Color>
And when I do this:
<Style x:Key="someStyle" TargetType="{x:Type Border}">
<Setter Property="Control.Background" Value="{DynamicResource MenuBackground}"/>
</Style>
I get the following error:

How could I set the background property equal to the resource MenuBackground. What am I doing wrong?
You need to bind to a
Brush, not aColorasBackgroundis aBrushproperty.Application.Resourcescould beControl.Resourcesor other .Resources respectively.