WPF RotateTransform对偏移量的问题
在下面的:
<Rectangle Height="60" HorizontalAlignment="Left" Margin="50,100,0,0" Name="rectangle2" Stroke="Black" VerticalAlignment="Top" Width="60" >
<Rectangle.RenderTransform>
<TransformGroup>
<RotateTransform Angle="45" CenterX="30" CenterY="30"/>
</TransformGroup>
</Rectangle.RenderTransform>
要在其中心旋转矩形,我必须将CenterX和Y设置为Rectangle大小的一半。有没有办法在标记中做到这一点?
像CenterX =“{Binding Path = Width 2}”之类的东西?
没有找到相关结果
已邀请:
1 个回复
体悉
本身设置
属性: