Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在WPF中按程序旋转图像?_C#_Wpf_Graphics - Fatal编程技术网

C# 如何在WPF中按程序旋转图像?

C# 如何在WPF中按程序旋转图像?,c#,wpf,graphics,C#,Wpf,Graphics,我想按程序旋转WPF中的图像。我见过如何将旋转绑定到控件。但是,我想将旋转绑定到对象的角度。我该怎么做? <Image Source="{Binding ElementName=ImageList,Path=SelectedItem.Image}"> <Image.LayoutTransform> <RotateTransform Angle="{Binding RotationProperty}"/> </Image.Layou

我想按程序旋转WPF中的图像。我见过如何将旋转绑定到控件。但是,我想将旋转绑定到对象的角度。我该怎么做?


<Image Source="{Binding ElementName=ImageList,Path=SelectedItem.Image}">
   <Image.LayoutTransform>
      <RotateTransform Angle="{Binding RotationProperty}"/>
   </Image.LayoutTransform>
</Image>
来源+更多信息:


来源+更多信息: