コード例 #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);
        }
コード例 #2
0
ファイル: Manipulation.cs プロジェクト: beda2280/wpf-1
        /// <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));
            }
        }
コード例 #3
0
ファイル: Manipulation.cs プロジェクト: sjyanxin/WPFSource
        /// <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)); 
            }
        } 
コード例 #4
0
 public static void SetManipulationPivot(System.Windows.UIElement element, ManipulationPivot pivot)
 {
 }
コード例 #5
0
 public static void SetManipulationPivot(System.Windows.UIElement element, ManipulationPivot pivot)
 {
 }
コード例 #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;
        }