wpf rotate image around center

后端 未结 1 1921
北荒
北荒 2020-12-28 15:13

I have an image on a button which I would like to rotate when the user clicks it. I allmost have it to work. The image rotates fine on click, but it doesn\'t rotate round it

相关标签:
1条回答
  • 2020-12-28 15:14

    Just set RenderTransformOrigin to (0.5, 0.5) on the image

    <Image Source="Images/refresh.jpg" 
        RenderTransformOrigin=".5,.5"
        Height="15">
    ...
    
    0 讨论(0)
提交回复
热议问题