开发者

How do you procedurally rotate an image in WPF?

I want procedurally rotate an image in WPF. 开发者_高级运维 I've seen how to bind a rotation to a control. But, I want to bind the rotation to an object's angle. How do I do that?


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

Source + more info: http://www.nbdtech.com/Blog/archive/2007/11/15/wpf-image-viewer-part-7-rotating-the-image-with-a.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜