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); }
/// <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) { }
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; }