Exemplo n.º 1
0
        private static ManipulationPivot2D ConvertPivot(ManipulationPivot pivot)
        {
            if (pivot != null)
            {
                Point center = pivot.Center;
                return(new ManipulationPivot2D()
                {
                    X = (float)center.X,
                    Y = (float)center.Y,
                    Radius = (float)Math.Max(1.0, pivot.Radius)
                });
            }

            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Changes the pivot for single-finger manipulation on an active manipulation.
        /// </summary>
        /// <param name="element">The element on which there is an active manipulation.</param>
        /// <param name="pivot">The new pivot for single-finger manipulation.</param>
        public static void SetManipulationPivot(UIElement element, ManipulationPivot pivot)
        {
            if (element == null)
            {
                throw new ArgumentNullException("element");
            }

            ManipulationDevice device = GetActiveManipulationDevice(element);

            if (device != null)
            {
                device.ManipulationPivot = pivot;
            }
            else
            {
                throw new InvalidOperationException(SR.Get(SRID.Manipulation_ManipulationNotActive));
            }
        }
Exemplo n.º 3
0
        /// <summary> 
        ///     Changes the pivot for single-finger manipulation on an active manipulation. 
        /// </summary>
        /// <param name="element">The element on which there is an active manipulation.</param> 
        /// <param name="pivot">The new pivot for single-finger manipulation.</param>
        public static void SetManipulationPivot(UIElement element, ManipulationPivot pivot)
        {
            if (element == null) 
            {
                throw new ArgumentNullException("element"); 
            } 

            ManipulationDevice device = GetActiveManipulationDevice(element); 
            if (device != null)
            {
                device.ManipulationPivot = pivot;
            } 
            else
            { 
                throw new InvalidOperationException(SR.Get(SRID.Manipulation_ManipulationNotActive)); 
            }
        } 
 public static void SetManipulationPivot(System.Windows.UIElement element, ManipulationPivot pivot)
 {
 }
 public static void SetManipulationPivot(System.Windows.UIElement element, ManipulationPivot pivot)
 {
 }
Exemplo n.º 6
0
        private static ManipulationPivot2D ConvertPivot(ManipulationPivot pivot) 
        {
            if (pivot != null) 
            { 
                Point center = pivot.Center;
                return new ManipulationPivot2D() 
                {
                    X = (float)center.X,
                    Y = (float)center.Y,
                    Radius = (float)Math.Max(1.0, pivot.Radius) 
                };
            } 
 
            return null;
        }