Exemple #1
0
        internal static bool TryCompleteManipulation(UIElement element)
        {
            ManipulationDevice device = ManipulationDevice.GetManipulationDevice(element);

            if (device != null)
            {
                device.CompleteManipulation(/* withInertia = */ false);
                return(true);
            }

            return(false);
        }
Exemple #2
0
        /// <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);
            }
        }