Class TouchManager
A utility class that exposes methods that enable touch management.
Inheritance
Namespace: Telerik.Windows.Input.Touch
Assembly: Telerik.Windows.Controls.dll
Syntax
public static class TouchManager : Object
Fields
DragStartTriggerProperty
Identifies the DragStartTrigger dependency property.
Declaration
public static readonly DependencyProperty DragStartTriggerProperty
Field Value
System.Windows.DependencyProperty
|
IsTouchHitTestVisibleProperty
Identifies the IsTouchHitTestVisible dependency property.
Declaration
public static readonly DependencyProperty IsTouchHitTestVisibleProperty
Field Value
System.Windows.DependencyProperty
|
ScrollViewerSwipeModeProperty
Identifies the ScrollViewerSwipeMode dependency property.
Declaration
public static readonly DependencyProperty ScrollViewerSwipeModeProperty
Field Value
System.Windows.DependencyProperty
|
ShouldSuspendMousePromotionProperty
Identifies the ShouldSuspendMousePromotion dependency property.
Declaration
public static readonly DependencyProperty ShouldSuspendMousePromotionProperty
Field Value
System.Windows.DependencyProperty
|
TouchModeProperty
Identifies the TouchMode dependency property.
Declaration
public static readonly DependencyProperty TouchModeProperty
Field Value
System.Windows.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
System.Double
|
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.
Declaration
public static bool IsEnabled { get; set; }
Property Value
System.Boolean
|
IsTouchEnabled
Gets or sets a value indicating whether the TouchManager responds to any touch events.
Declaration
public static bool IsTouchEnabled { get; set; }
Property Value
System.Boolean
|
MultiTapTime
Gets or sets the time, in milliseconds, that can elapse between two successive tap actions for the TouchManager to consider them multiple-taps.
Declaration
public static int MultiTapTime { get; set; }
Property Value
System.Int32
|
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
System.Double
|
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
System.Double
|
SwipeInertiaDuration
Gets or sets the duration of the swipe inertia, in milliseconds.
Declaration
public static int SwipeInertiaDuration { get; set; }
Property Value
System.Int32
|
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
System.Double
|
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.
Declaration
public static int TapTime { get; set; }
Property Value
System.Int32
|
TapVicinity
Gets or sets the maximum distance a touch point can move for the action to be considered a tap.
Declaration
public static double TapVicinity { get; set; }
Property Value
System.Double
|
Methods
AddDragEventHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the Drag event.
Declaration
public static void AddDragEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddDragFinishedEventHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the DragFinished event.
Declaration
public static void AddDragFinishedEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddDragStartedEventHandler(UIElement, TouchEventHandler, Boolean)
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
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddLostTouchCaptureHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the LostTouchCapture event.
Declaration
public static void AddLostTouchCaptureHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddPinchEventHandler(UIElement, PinchEventHandler, Boolean)
Adds a handler for the Pinch event.
Declaration
public static void AddPinchEventHandler(UIElement element, PinchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
PinchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddPinchFinishedEventHandler(UIElement, PinchEventHandler, Boolean)
Adds a handler for the PinchFinished event.
Declaration
public static void AddPinchFinishedEventHandler(UIElement element, PinchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
PinchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddPinchStartedEventHandler(UIElement, PinchEventHandler, Boolean)
Adds a handler for the PinchStarted event.
Declaration
public static void AddPinchStartedEventHandler(UIElement element, PinchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
PinchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddSwipeEventHandler(UIElement, SwipeEventHandler, Boolean)
Adds a handler for the Swipe event.
Declaration
public static void AddSwipeEventHandler(UIElement element, SwipeEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
SwipeEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddSwipeFinishedEventHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the SwipeFinished event.
Declaration
public static void AddSwipeFinishedEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddSwipeInertiaEventHandler(UIElement, SwipeInertiaEventHandler, Boolean)
Adds a handler for the SwipeInertia event.
Declaration
public static void AddSwipeInertiaEventHandler(UIElement element, SwipeInertiaEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
SwipeInertiaEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddSwipeInertiaFinishedEventHandler(UIElement, RadRoutedEventHandler, Boolean)
Adds a handler for the SwipeInertiaFinished event.
Declaration
public static void AddSwipeInertiaFinishedEventHandler(UIElement element, RadRoutedEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
RadRoutedEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddSwipeInertiaStartedEventHandler(UIElement, RadRoutedEventHandler, Boolean)
Adds a handler for the SwipeInertiaStarted event.
Declaration
public static void AddSwipeInertiaStartedEventHandler(UIElement element, RadRoutedEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
RadRoutedEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddSwipeStartedEventHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the SwipeStarted event.
Declaration
public static void AddSwipeStartedEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddTapAndHoldEventHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the TapAndHold event.
Declaration
public static void AddTapAndHoldEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddTapEventHandler(UIElement, TapEventHandler, Boolean)
Adds a handler for the Tap event.
Declaration
public static void AddTapEventHandler(UIElement element, TapEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TapEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddTapHoldAndReleaseEventHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the TapHoldAndRelease event.
Declaration
public static void AddTapHoldAndReleaseEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddTouchDownEventHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the TouchDown event.
Declaration
public static void AddTouchDownEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddTouchEnterEventHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the TouchEnter event.
Declaration
public static void AddTouchEnterEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddTouchLeaveEventHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the TouchLeave event.
Declaration
public static void AddTouchLeaveEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddTouchMoveEventHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the TouchMove event.
Declaration
public static void AddTouchMoveEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
AddTouchUpEventHandler(UIElement, TouchEventHandler, Boolean)
Adds a handler for the TouchUp event.
Declaration
public static void AddTouchUpEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
System.Boolean
handledEventsToo
|
CaptureTouch(UIElement, TouchDevice)
Attempts to capture the touch device.
Declaration
public static bool CaptureTouch(UIElement element, TouchDevice touchDevice)
Parameters
System.Windows.UIElement
element
|
System.Windows.Input.TouchDevice
touchDevice
|
Returns
System.Boolean
|
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
System.Windows.FrameworkElement
root
|
GetCaptured(TouchDevice)
Gets the element that has captured the touch device.
Declaration
public static UIElement GetCaptured(TouchDevice touchDevice)
Parameters
System.Windows.Input.TouchDevice
touchDevice
|
Returns
System.Windows.UIElement
|
GetDragStartTrigger(DependencyObject)
Gets a value indicating which action starts a drag operation.
Declaration
public static TouchDragStartTrigger GetDragStartTrigger(DependencyObject obj)
Parameters
System.Windows.DependencyObject
obj
|
Returns
TouchDragStartTrigger
|
GetIsTouchHitTestVisible(DependencyObject)
Gets a value indicating whether this object responds to any touch events.
Declaration
public static bool GetIsTouchHitTestVisible(DependencyObject obj)
Parameters
System.Windows.DependencyObject
obj
|
Returns
System.Boolean
|
GetScrollViewerSwipeMode(DependencyObject)
Gets the scroll viewer swipe mode.
Declaration
public static ScrollViewerSwipeMode GetScrollViewerSwipeMode(DependencyObject obj)
Parameters
System.Windows.DependencyObject
obj
|
Returns
ScrollViewerSwipeMode
|
GetShouldSuspendMousePromotion(DependencyObject)
Gets a value indicating whether mouse events should be suspended during touch input.
Declaration
public static bool GetShouldSuspendMousePromotion(DependencyObject obj)
Parameters
System.Windows.DependencyObject
obj
|
Returns
System.Boolean
|
GetTouchMode(DependencyObject)
Gets a value indicating the touch mode of the object.
Declaration
public static TouchMode GetTouchMode(DependencyObject obj)
Parameters
System.Windows.DependencyObject
obj
|
Returns
TouchMode
|
ReleaseTouchCapture(UIElement, TouchDevice)
Releases the touch capture.
Declaration
public static bool ReleaseTouchCapture(UIElement element, TouchDevice touchDevice)
Parameters
System.Windows.UIElement
element
|
System.Windows.Input.TouchDevice
touchDevice
|
Returns
System.Boolean
|
RemoveDragEventHandler(UIElement, TouchEventHandler)
Removes the handler for the Drag event.
Declaration
public static void RemoveDragEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemoveDragFinishedEventHandler(UIElement, TouchEventHandler)
Removes the handler for the DragFinished event.
Declaration
public static void RemoveDragFinishedEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemoveDragStartedEventHandler(UIElement, TouchEventHandler)
Removes the handler for the DragStarted event.
Declaration
public static void RemoveDragStartedEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemoveLostTouchCaptureHandler(UIElement, TouchEventHandler)
Removes the handler for the LostTouchCapture event.
Declaration
public static void RemoveLostTouchCaptureHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemovePinchEventHandler(UIElement, PinchEventHandler)
Removes the handler for the Pinch event.
Declaration
public static void RemovePinchEventHandler(UIElement element, PinchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
PinchEventHandler
handler
|
RemovePinchFinishedEventHandler(UIElement, PinchEventHandler)
Removes the handler for the PinchFinished event.
Declaration
public static void RemovePinchFinishedEventHandler(UIElement element, PinchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
PinchEventHandler
handler
|
RemovePinchStartedEventHandler(UIElement, PinchEventHandler)
Removes the handler for the PinchStarted event.
Declaration
public static void RemovePinchStartedEventHandler(UIElement element, PinchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
PinchEventHandler
handler
|
RemoveSwipeEventHandler(UIElement, SwipeEventHandler)
Removes the handler for the Swipe event.
Declaration
public static void RemoveSwipeEventHandler(UIElement element, SwipeEventHandler handler)
Parameters
System.Windows.UIElement
element
|
SwipeEventHandler
handler
|
RemoveSwipeFinishedEventHandler(UIElement, TouchEventHandler)
Removes the handler for the SwipeFinished event.
Declaration
public static void RemoveSwipeFinishedEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemoveSwipeInertiaEventHandler(UIElement, SwipeInertiaEventHandler)
Removes the handler for the SwipeInertia event.
Declaration
public static void RemoveSwipeInertiaEventHandler(UIElement element, SwipeInertiaEventHandler handler)
Parameters
System.Windows.UIElement
element
|
SwipeInertiaEventHandler
handler
|
RemoveSwipeInertiaFinishedEventHandler(UIElement, RadRoutedEventHandler)
Removes the handler for the SwipeInertiaFinished event.
Declaration
public static void RemoveSwipeInertiaFinishedEventHandler(UIElement element, RadRoutedEventHandler handler)
Parameters
System.Windows.UIElement
element
|
RadRoutedEventHandler
handler
|
RemoveSwipeInertiaStartedEventHandler(UIElement, RadRoutedEventHandler)
Removes the handler for the SwipeInertiaStarted event.
Declaration
public static void RemoveSwipeInertiaStartedEventHandler(UIElement element, RadRoutedEventHandler handler)
Parameters
System.Windows.UIElement
element
|
RadRoutedEventHandler
handler
|
RemoveSwipeStartedEventHandler(UIElement, TouchEventHandler)
Removes the handler for the SwipeStarted event.
Declaration
public static void RemoveSwipeStartedEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemoveTapAndHoldEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TapAndHold event.
Declaration
public static void RemoveTapAndHoldEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemoveTapEventHandler(UIElement, TapEventHandler)
Removes the handler for the Tap event.
Declaration
public static void RemoveTapEventHandler(UIElement element, TapEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TapEventHandler
handler
|
RemoveTapHoldAndReleaseEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TapHoldAndRelease event.
Declaration
public static void RemoveTapHoldAndReleaseEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemoveTouchDownEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TouchDown event.
Declaration
public static void RemoveTouchDownEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemoveTouchEnterEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TouchEnter event.
Declaration
public static void RemoveTouchEnterEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemoveTouchLeaveEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TouchLeave event.
Declaration
public static void RemoveTouchLeaveEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemoveTouchMoveEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TouchMove event.
Declaration
public static void RemoveTouchMoveEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
RemoveTouchUpEventHandler(UIElement, TouchEventHandler)
Removes the handler for the TouchUp event.
Declaration
public static void RemoveTouchUpEventHandler(UIElement element, TouchEventHandler handler)
Parameters
System.Windows.UIElement
element
|
TouchEventHandler
handler
|
SetDragStartTrigger(DependencyObject, TouchDragStartTrigger)
Sets a value indicating which action starts a drag operation.
Declaration
public static void SetDragStartTrigger(DependencyObject obj, TouchDragStartTrigger value)
Parameters
System.Windows.DependencyObject
obj
|
TouchDragStartTrigger
value
|
SetIsTouchHitTestVisible(DependencyObject, Boolean)
Sets a value indicating whether this object responds to any touch events.
Declaration
public static void SetIsTouchHitTestVisible(DependencyObject obj, bool value)
Parameters
System.Windows.DependencyObject
obj
|
System.Boolean
value
|
SetScrollViewerSwipeMode(DependencyObject, ScrollViewerSwipeMode)
Sets the scroll viewer swipe mode.
Declaration
public static void SetScrollViewerSwipeMode(DependencyObject obj, ScrollViewerSwipeMode value)
Parameters
System.Windows.DependencyObject
obj
|
ScrollViewerSwipeMode
value
|
SetShouldSuspendMousePromotion(DependencyObject, Boolean)
Sets a value indicating whether mouse events should be suspended during touch input.
Declaration
public static void SetShouldSuspendMousePromotion(DependencyObject obj, bool value)
Parameters
System.Windows.DependencyObject
obj
|
System.Boolean
value
|
SetTouchMode(DependencyObject, TouchMode)
Sets a value indicating the touch mode of the object.
Declaration
public static void SetTouchMode(DependencyObject obj, TouchMode value)
Parameters
System.Windows.DependencyObject
obj
|
TouchMode
value
|