using System.Windows.Input;
using System.Windows.Media;
using Microsoft.Phone.Controls;

namespace WPGesture1
{
    public partial class MainPage : PhoneApplicationPage
    {
        public MainPage()
        {
            InitializeComponent();
            
            //Hinzufügen einer Objektes zum Transformieren der Position
            rectangleDrag.RenderTransform = new TranslateTransform();
        }

        private void rectangleDrag_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)
        {
            //Transformieren des Rechtecks
            TranslateTransform tform = rectangleDrag.RenderTransform as TranslateTransform;
            tform.X += e.DeltaManipulation.Translation.X;
            tform.Y += e.DeltaManipulation.Translation.Y;

        }
    }
}
