Esempio n. 1
0
        public void ResetManipulation()
        {
            // Reset previous transform to the initial transform of the element
            this._previousTransform = new Windows.UI.Xaml.Media.MatrixTransform()
            {
                Matrix = this._initialTransform.Matrix
            };

            // Recreate delta transfrom. This way it is initalized to the identity transform.
            this._deltaTransform = new Windows.UI.Xaml.Media.CompositeTransform();

            // The actual transform is obtained as the composition of the delta transform
            // with the previous transform
            this._transform = new Windows.UI.Xaml.Media.TransformGroup()
            {
                Children = { this._previousTransform, this._deltaTransform }
            };

            // Set the element's transform
            this._target.RenderTransform = this._transform;
        }
Esempio n. 2
0
        public void ResetManipulation()
        {
            // Reset previous transform to the initial transform of the element
            this._previousTransform = new Windows.UI.Xaml.Media.MatrixTransform()
            {
                Matrix = this._initialTransform.Matrix
            };

            this._deltaTransform = new Windows.UI.Xaml.Media.CompositeTransform();

            this._transform = new Windows.UI.Xaml.Media.TransformGroup()
            {
                Children = { this._previousTransform, this._deltaTransform }
            };

            // Set the element's transform
            this._target.RenderTransform = this._transform;
        }
        public void ResetManipulation()
        {
            // Reset previous transform to the initial transform of the element
            this._previousTransform = new Windows.UI.Xaml.Media.MatrixTransform()
            {
                Matrix = this._initialTransform.Matrix
            };

            // Recreate delta transfrom. This way it is initalized to the identity transform.
            this._deltaTransform = new Windows.UI.Xaml.Media.CompositeTransform();

            // The actual transform is obtained as the composition of the delta transform
            // with the previous transform
            this._transform = new Windows.UI.Xaml.Media.TransformGroup()
            {
                Children = { this._previousTransform, this._deltaTransform }
            };

            // Set the element's transform
            this._target.RenderTransform = this._transform;
        }