سلام 😉 در این مطلب کد چرخش مستطیل با RotateTransform با wpf و c#.net را آماده کردم. امیدوارم که این کد برای شما مفید باشد.
خروجی این کد:
کد چرخش مستطیل با RotateTransform با wpf و c#.net :
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
<Grid>
<Rectangle Height ="100" Width ="40" Fill ="Red" Grid.Row="0" Grid.Column="0">
<Rectangle.LayoutTransform>
<RotateTransform Angle ="45"/>
</Rectangle.LayoutTransform>
</Rectangle>
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
<Grid>
<Rectangle Height ="100" Width ="40" Fill ="Red" Grid.Row="0" Grid.Column="0">
<Rectangle.LayoutTransform>
<RotateTransform Angle ="45"/>
</Rectangle.LayoutTransform>
</Rectangle>