Is there any way how to set Image size by WPF styles?
I have in my XAML:
<Image Style="MyImageStyle" Source="{StaticResource MyImage}" />
And in ResourceDictionary as a style:
<Style x:Key="MyImageStyle">
<Setter Property="Width" Value="30" />
But it doesn´t work. I get this error: Cannot resolve the Style Property 'Width'. Verify that the owning type is the Style's TargetType, or use Class.Property syntax to specify the Property.
Thx.