Search Results

Search found 1 results on 1 pages for 'gwenda t'.

Page 1/1 | 1 

  • How do i rotate a 2D picturebox according to my mouse

    - by Gwenda.T
    I would want to rotate my picturebox which contains an image. The image will just spin around following the mouse, but the position of the image is fixed. Any idea on how it should be done? Btw using Visual Studio 2012 C# Windows phone application for Windows Phone 8. I've did a little research on google but the other codes were from VS2012 using a WinForm But it's different now I'm not able to use their code. So I was hoping I could find some answer at here! Currently now I have this private void arrowHead_Tap(object sender, System.Windows.Input.GestureEventArgs e) { Duration Time_duration = new Duration(TimeSpan.FromSeconds(0.5)); Storyboard MyStory = new Storyboard(); MyStory.Duration = Time_duration; DoubleAnimation My_Double = new DoubleAnimation(); My_Double.Duration = Time_duration; MyStory.Children.Add(My_Double); RotateTransform MyTransform = new RotateTransform(); Storyboard.SetTarget(My_Double, MyTransform); Storyboard.SetTargetProperty(My_Double, new PropertyPath("Angle")); My_Double.To = 15; arrowHead.RenderTransform = MyTransform; arrowHead.RenderTransformOrigin = new Point(0.5, 0.5); //stackPanel1.Children.Add(image1); MyStory.Begin(); } This is my only way of tilting the image however now I want it to follow my mouse! Thanks!

    Read the article

1