<Window x:Class="变换与透明.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:变换与透明"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Canvas>
<Rectangle Width="80" Height="10" Stroke="Blue" Fill="Yellow" Canvas.Top="100" Canvas.Left="100">
</Rectangle>
<Rectangle Width="80" Height="10" Stroke="Blue" Fill="Yellow" Canvas.Top="100" Canvas.Left="100">
<Rectangle.RenderTransform>
<RotateTransform Angle="25" CenterX="40" CenterY="5"></RotateTransform>
</Rectangle.RenderTransform>
</Rectangle>
<Rectangle Width="80" Height="10" Stroke="Blue" Fill="Yellow" RenderTransformOrigin="0.5,0.5" Canvas.Top="100" Canvas.Left="100">
<Rectangle.RenderTransform>
<RotateTransform Angle="50" ></RotateTransform>
</Rectangle.RenderTransform>
</Rectangle>
</Canvas>
</Window>