internal static bool TryCompleteManipulation(UIElement element) { ManipulationDevice device = ManipulationDevice.GetManipulationDevice(element); if (device != null) { device.CompleteManipulation(/* withInertia = */ false); return(true); } return(false); }
/// <summary> /// If a manipulation is active, forces the manipulation to proceed to the inertia phase. /// If inertia is already occurring, it will restart inertia. /// </summary> /// <param name="element">The element on which there is an active manipulation.</param> public static void StartInertia(UIElement element) { if (element == null) { throw new ArgumentNullException("element"); } ManipulationDevice device = ManipulationDevice.GetManipulationDevice(element); if (device != null) { device.CompleteManipulation(/* withInertia = */ true); } }