I've got some XAML for a UserControl that looks roughly like this:
<UserControl>
<UserControl.RenderTransform>
<ScaleTransform ScaleX="1" ScaleY="1" />
</UserControl.RenderTransform>
<UserControl.Style>
<Style TargetType="UserControl">
<Style.Triggers>
<DataTrigger Binding="..." Value="...">
<Setter Property="RenderTransform.ScaleX" Value="0.5" />
<Setter Property="RenderTransform.ScaleY" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</UserControl.Style>
</UserControl>
But when I compile, I get the error:
Cannot resolve the Style Property 'ScaleX'. Verify that the owning type is the Style's TargetType, or use Class.Property syntax to specify the Property.
I've tried all sorts of permutations of the Property but I can't find one that actually works. In other cases, I'll just name the ScaleTransform and reference that with TargetName. But you can't use TargetName in a Style Setter.
I guess my alternative is something like this:
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="0.5" ScaleY="0.5" />
</Setter.Value>
</Setter>
But that seems a little heavy-handed.
I'm sure I'm just missing something. But I could really use some help here.