Im just writing my own personal styles. Everything is ok, no error inside styles.
I have following code
<Color x:Key="DialogButtonBorderBrushColor" A="255" R="177" G="177" B="177" />
<SolidColorBrush x:Key="BorderBrush" Color="{StaticResource DialogButtonBorderBrushColor}" />
There is a style for my dialog button.
<Style x:Key="DialogButtonStyle" TargetType="Button">
<Setter Property="MinWidth" Value="80" />
<Setter Property="MinHeight" Value="30" />
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Background" Value="{StaticResource DialogButtonBackgroundColor1}"/>
</Style>
Im just using this dialogButtonStyle in xaml Button as a style. But when I use this style I get following error:
#FFFAFAFA
is not a valid value for the System.Windows.Controls.Panel.Background property on setter.
I have really no idea what to do with this. Can you help me? Thanks.
<Setter Property="Background" Value="{StaticResource DialogButtonBackgroundColor1}"/>
Background
property expects Brush
value. Judging by the name of resource, DialogButtonBackgroundColor1
is a Color
. You should use Brush resource similar to BorderBrush
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With