I need to apply multiple transform effect via c# in WPF.
I have tried code below but I see the last effect only and not the both together.
Any clue if it is possible to do?
XAML
<Grid>
<Rectangle Fill="#FFF4F4F5" Name="rect" HorizontalAlignment="Left" Height="225" Margin="84,39,0,0" Stroke="Black" VerticalAlignment="Top" Width="299"/>
</Grid>
C#
SkewTransform skewTransform1 = new SkewTransform(45, 0, -50, 50);
rect.RenderTransform = skewTransform1;
RotateTransform rotateTransform = new RotateTransform(30);
rect.RenderTransform = rotateTransform;
You have to combine both effects in a
TransformGroupinstead of overwriting them each time: