ClassTouchManager
Manages touch input for the application, providing methods to process touch events and gestures.
Definition
Namespace:Telerik.Windows.Input.Touch
Assembly:Telerik.Windows.Controls.dll
Syntax:
public static class TouchManager
Inheritance: objectTouchManager
Fields
DragStartTriggerProperty
Identifies the DragStartTrigger dependency property.
Declaration
public static readonly DependencyProperty DragStartTriggerProperty
Field Value
DependencyProperty
ScrollViewerSwipeModeProperty
Identifies the ScrollViewerSwipeMode dependency property.
Declaration
public static readonly DependencyProperty ScrollViewerSwipeModeProperty
Field Value
DependencyProperty
ShouldSuspendMousePromotionProperty
Identifies the ShouldSuspendMousePromotion dependency property.
Declaration
public static readonly DependencyProperty ShouldSuspendMousePromotionProperty
Field Value
DependencyProperty
TouchModeProperty
Identifies the TouchMode dependency property.
Declaration
public static readonly DependencyProperty TouchModeProperty
Field Value
DependencyProperty
Properties
DragStartDistance
Gets or sets the minimum distance a touch point has to move before the action is considered a drag.
Declaration
public static double DragStartDistance { get; set; }
Property Value
IsEnabled
Gets or sets a value indicating whether the TouchManager hooks to any input events. Should be set at the start of the application. Once set to false it cannot be set back to true.
IsTouchEnabled
Gets or sets a value indicating whether the TouchManager responds to any touch events.
MultiTapTime
Gets or sets the time, in milliseconds, that can elapse between two successive tap actions for the TouchManager to consider them multiple-taps.
MultiTapVicinity
Gets or sets the maximum distance between two successive tap actions for the TouchManager to consider them multiple-taps.
Declaration
public static double MultiTapVicinity { get; set; }
Property Value
PinchStartDistance
Gets or sets the minimum distance a touch point has to move before the action is considered a pinch.
Declaration
public static double PinchStartDistance { get; set; }
Property Value
SwipeInertiaDuration
Gets or sets the duration of the swipe inertia, in milliseconds.
Declaration
public static int SwipeInertiaDuration { get; set; }
Property Value
SwipeStartDistance
Gets or sets the minimum distance a touch point has to move before the action is considered a swipe.
Declaration
public static double SwipeStartDistance { get; set; }
Property Value
TapTime
Gets or sets the time, in milliseconds, that can elapse between a touch down and a touch up for the action to be considered a tap.
TapVicinity
Gets or sets the maximum distance a touch point can move for the action to be considered a tap.
Methods
AddDragEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the Drag event.
Declaration
public static void AddDragEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddDragFinishedEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the DragFinished event.
Declaration
public static void AddDragFinishedEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddDragStartedEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the DragStarted event. If this event is not handled, the Drag operation will finish.
Declaration
public static void AddDragStartedEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddLostTouchCaptureHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the LostTouchCapture event.
Declaration
public static void AddLostTouchCaptureHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddPinchEventHandler(UIElement, PinchEventHandler, bool)
Adds a handler for the Pinch event.
Declaration
public static void AddPinchEventHandler(UIElement element, PinchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddPinchFinishedEventHandler(UIElement, PinchEventHandler, bool)
Adds a handler for the PinchFinished event.
Declaration
public static void AddPinchFinishedEventHandler(UIElement element, PinchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddPinchStartedEventHandler(UIElement, PinchEventHandler, bool)
Adds a handler for the PinchStarted event.
Declaration
public static void AddPinchStartedEventHandler(UIElement element, PinchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddSwipeEventHandler(UIElement, SwipeEventHandler, bool)
Adds a handler for the Swipe event.
Declaration
public static void AddSwipeEventHandler(UIElement element, SwipeEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddSwipeFinishedEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the SwipeFinished event.
Declaration
public static void AddSwipeFinishedEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddSwipeInertiaEventHandler(UIElement, SwipeInertiaEventHandler, bool)
Adds a handler for the SwipeInertia event.
Declaration
public static void AddSwipeInertiaEventHandler(UIElement element, SwipeInertiaEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddSwipeInertiaFinishedEventHandler(UIElement, RadRoutedEventHandler, bool)
Adds a handler for the SwipeInertiaFinished event.
Declaration
public static void AddSwipeInertiaFinishedEventHandler(UIElement element, RadRoutedEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddSwipeInertiaStartedEventHandler(UIElement, RadRoutedEventHandler, bool)
Adds a handler for the SwipeInertiaStarted event.
Declaration
public static void AddSwipeInertiaStartedEventHandler(UIElement element, RadRoutedEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddSwipeStartedEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the SwipeStarted event.
Declaration
public static void AddSwipeStartedEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddTapAndHoldEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the TapAndHold event.
Declaration
public static void AddTapAndHoldEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddTapEventHandler(UIElement, TapEventHandler, bool)
Adds a handler for the Tap event.
Declaration
public static void AddTapEventHandler(UIElement element, TapEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddTapHoldAndReleaseEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the TapHoldAndRelease event.
Declaration
public static void AddTapHoldAndReleaseEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddTouchDownEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the TouchDown event.
Declaration
public static void AddTouchDownEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddTouchEnterEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the TouchEnter event.
Declaration
public static void AddTouchEnterEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddTouchLeaveEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the TouchLeave event.
Declaration
public static void AddTouchLeaveEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddTouchMoveEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the TouchMove event.
Declaration
public static void AddTouchMoveEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
AddTouchUpEventHandler(UIElement, TouchEventHandler, bool)
Adds a handler for the TouchUp event.
Declaration
public static void AddTouchUpEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
element
UIElement
handler
handledEventsToo
CaptureTouch(UIElement, TouchDevice)
Attempts to capture the touch device.
Declaration
public static bool CaptureTouch(UIElement element, TouchDevice touchDevice)
Parameters
element
UIElement
touchDevice
TouchDevice
Returns
CeaseGestures(FrameworkElement)
Ceases the execution of any active gestures for elements within this root element. When root is null, all active gestures cease.
Declaration
public static void CeaseGestures(FrameworkElement root)
Parameters
root
FrameworkElement
GetCaptured(TouchDevice)
Gets the element that has captured the touch device.
Declaration
public static UIElement GetCaptured(TouchDevice touchDevice)
Parameters
touchDevice
TouchDevice
Returns
UIElement
GetDragStartTrigger(DependencyObject)
Gets a value indicating which action starts a drag operation.
Declaration
public static TouchDragStartTrigger GetDragStartTrigger(DependencyObject obj)
Parameters
obj
DependencyObject
Returns
GetScrollViewerSwipeMode(DependencyObject)
Gets the scroll viewer swipe mode.
Declaration
public static ScrollViewerSwipeMode GetScrollViewerSwipeMode(DependencyObject obj)
Parameters
obj
DependencyObject
Returns
GetShouldSuspendMousePromotion(DependencyObject)
Gets a value indicating whether mouse events should be suspended during touch input.
Declaration
public static bool GetShouldSuspendMousePromotion(DependencyObject obj)
Parameters
obj
DependencyObject
Returns
GetTouchMode(DependencyObject)
Gets a value indicating the touch mode of the object.
Declaration
public static TouchMode GetTouchMode(DependencyObject obj)
Parameters
obj
DependencyObject
Returns
ReleaseTouchCapture(UIElement, TouchDevice)
Releases the touch capture.
Declaration
public static bool ReleaseTouchCapture(UIElement element, TouchDevice touchDevice)
Parameters
element
UIElement
touchDevice
TouchDevice
Returns
RemoveDragEventHandler(UIElement, TouchEventHandler)
Removes the handler for the Drag event.
Declaration
public static void RemoveDragEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemoveDragFinishedEventHandler(UIElement, TouchEventHandler)
Removes the handler for the DragFinished event.
Declaration
public static void RemoveDragFinishedEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemoveDragStartedEventHandler(UIElement, TouchEventHandler)
Removes the handler for the DragStarted event.
Declaration
public static void RemoveDragStartedEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemoveLostTouchCaptureHandler(UIElement, TouchEventHandler)
Removes the handler for the LostTouchCapture event.
Declaration
public static void RemoveLostTouchCaptureHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemovePinchEventHandler(UIElement, PinchEventHandler)
Removes the handler for the Pinch event.
Declaration
public static void RemovePinchEventHandler(UIElement element, PinchEventHandler handler)
Parameters
element
UIElement
handler
RemovePinchFinishedEventHandler(UIElement, PinchEventHandler)
Removes the handler for the PinchFinished event.
Declaration
public static void RemovePinchFinishedEventHandler(UIElement element, PinchEventHandler handler)
Parameters
element
UIElement
handler
RemovePinchStartedEventHandler(UIElement, PinchEventHandler)
Removes the handler for the PinchStarted event.
Declaration
public static void RemovePinchStartedEventHandler(UIElement element, PinchEventHandler handler)
Parameters
element
UIElement
handler
RemoveSwipeEventHandler(UIElement, SwipeEventHandler)
Removes the handler for the Swipe event.
Declaration
public static void RemoveSwipeEventHandler(UIElement element, SwipeEventHandler handler)
Parameters
element
UIElement
handler
RemoveSwipeFinishedEventHandler(UIElement, TouchEventHandler)
Removes the handler for the SwipeFinished event.
Declaration
public static void RemoveSwipeFinishedEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemoveSwipeInertiaEventHandler(UIElement, SwipeInertiaEventHandler)
Removes the handler for the SwipeInertia event.
Declaration
public static void RemoveSwipeInertiaEventHandler(UIElement element, SwipeInertiaEventHandler handler)
Parameters
element
UIElement
handler
RemoveSwipeInertiaFinishedEventHandler(UIElement, RadRoutedEventHandler)
Removes the handler for the SwipeInertiaFinished event.
Declaration
public static void RemoveSwipeInertiaFinishedEventHandler(UIElement element, RadRoutedEventHandler handler)
Parameters
element
UIElement
handler
RemoveSwipeInertiaStartedEventHandler(UIElement, RadRoutedEventHandler)
Removes the handler for the SwipeInertiaStarted event.
Declaration
public static void RemoveSwipeInertiaStartedEventHandler(UIElement element, RadRoutedEventHandler handler)
Parameters
element
UIElement
handler
RemoveSwipeStartedEventHandler(UIElement, TouchEventHandler)
Removes the handler for the SwipeStarted event.
Declaration
public static void RemoveSwipeStartedEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemoveTapAndHoldEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TapAndHold event.
Declaration
public static void RemoveTapAndHoldEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemoveTapEventHandler(UIElement, TapEventHandler)
Removes the handler for the Tap event.
Declaration
public static void RemoveTapEventHandler(UIElement element, TapEventHandler handler)
Parameters
element
UIElement
handler
RemoveTapHoldAndReleaseEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TapHoldAndRelease event.
Declaration
public static void RemoveTapHoldAndReleaseEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemoveTouchDownEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TouchDown event.
Declaration
public static void RemoveTouchDownEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemoveTouchEnterEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TouchEnter event.
Declaration
public static void RemoveTouchEnterEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemoveTouchLeaveEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TouchLeave event.
Declaration
public static void RemoveTouchLeaveEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemoveTouchMoveEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TouchMove event.
Declaration
public static void RemoveTouchMoveEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
RemoveTouchUpEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TouchUp event.
Declaration
public static void RemoveTouchUpEventHandler(UIElement element, TouchEventHandler handler)
Parameters
element
UIElement
handler
SetDragStartTrigger(DependencyObject, TouchDragStartTrigger)
Sets a value indicating which action starts a drag operation.
Declaration
public static void SetDragStartTrigger(DependencyObject obj, TouchDragStartTrigger value)
Parameters
obj
DependencyObject
value
SetScrollViewerSwipeMode(DependencyObject, ScrollViewerSwipeMode)
Sets the scroll viewer swipe mode.
Declaration
public static void SetScrollViewerSwipeMode(DependencyObject obj, ScrollViewerSwipeMode value)
Parameters
obj
DependencyObject
value
SetShouldSuspendMousePromotion(DependencyObject, bool)
Sets a value indicating whether mouse events should be suspended during touch input.
Declaration
public static void SetShouldSuspendMousePromotion(DependencyObject obj, bool value)
Parameters
obj
DependencyObject
value
SetTouchMode(DependencyObject, TouchMode)
Sets a value indicating the touch mode of the object.
Declaration
public static void SetTouchMode(DependencyObject obj, TouchMode value)
Parameters
obj
DependencyObject
value