Is that possible to set an integer value in WPF control Resources?!
<UserControl.Resources>
<SolidColorBrush x:Key="MyLineBrush" Color="LightGreen" />
??? <Integer x:Key="MyStrokeThickness" Value="2" /> ???
<Style TargetType="local:MyLine" x:Key="MyLineStyleKey">
<Setter Property="Stroke"
Value="{DynamicResource MyLineBrush}"/>
<Setter Property="StrokeThickness"
Value="{DynamicResource MyStrokeThickness}"/>
</Style>
In order to modify dynamically the MyLineBrush and MyStrokeThickness values…
To make that declaration you need to import the
Systemnamespace:…
Note: you will need to use a
Doublefor most WPF properties instead of anInt32