コード例 #1
0
ファイル: Manipulation.cs プロジェクト: beda2280/wpf-1
        internal static bool TryCompleteManipulation(UIElement element)
        {
            ManipulationDevice device = ManipulationDevice.GetManipulationDevice(element);

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

            return(false);
        }
コード例 #2
0
ファイル: Manipulation.cs プロジェクト: beda2280/wpf-1
        /// <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);
            }
        }