I have a image that transformed in design time to get it specific angle. XAML is like below.
<Image x:Name="Yelkovan" HorizontalAlignment="Left" Height="163" Margin="178,80,0,0" VerticalAlignment="Top" Width="14" Source="/k-yelkovan.png" RenderTransformOrigin="0.558,0.863">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-30"/>
<TranslateTransform X="27.336" Y="-7.117"/>
</TransformGroup>
</Image.RenderTransform>
</Image>
I want to set angle by vb.net code in runtime, ie when press a button, set its transform angle from -30 to ie : +45 deg only. How is this possible?
>Solution :
You can give your RotateTransform a name:
<RotateTransform x:Name="Rotation" Angle="-30"/>
Then you can access it like a control:
Me.Rotation.Angle = -25