繁体   English   中英

如何以程序方式在WPF中旋转图像?

[英]How do you procedurally rotate an image in WPF?

我想以程序方式在WPF中旋转图像。 我已经看到了如何将旋转绑定到控件。 但是,我想将旋转绑定到对象的角度。 我怎么做?

<Image Source="{Binding ElementName=ImageList,Path=SelectedItem.Image}">
   <Image.LayoutTransform>
      <RotateTransform Angle="{Binding RotationProperty}"/>
   </Image.LayoutTransform>
</Image>

来源+更多信息: http : //www.nbdtech.com/Blog/archive/2007/11/15/wpf-image-viewer-part-7-rotating-the-image-with-a.aspx

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM