How to rotate an image at a certain angle in Windows Phone 7 Silverlight?

I am starting to develop Windows Phone 7 Development, I am creating an application in which I want to rotate the image by a certain angle, for example, I have an image of an arrow pointing up, I want it to point at 15 degrees,

How do i do this? as the user enters an angle, and the image rotates. are there some features available for this?

+4
source share
1 answer

use RotateTransform

<Image ... x:Name"myImg"> <Image.RenderTransform> <RotateTransform Angle="90" /> </Image.RenderTransform> </Image> 

in code that you can rotate by calling:

 ((RotateTransform)myImg.RenderTransform).Angle = x; 
+5
source

Source: https://habr.com/ru/post/1384560/


All Articles