Class
TouchManager

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:

cs-api-definition
public static class TouchManager

Inheritance: objectTouchManager

Fields

DragStartTriggerProperty

Identifies the DragStartTrigger dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DragStartTriggerProperty

Field Value

DependencyProperty

ScrollViewerSwipeModeProperty

Identifies the ScrollViewerSwipeMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ScrollViewerSwipeModeProperty

Field Value

DependencyProperty

ShouldSuspendMousePromotionProperty

Identifies the ShouldSuspendMousePromotion dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ShouldSuspendMousePromotionProperty

Field Value

DependencyProperty

TouchModeProperty

Identifies the TouchMode dependency property.

Declaration

cs-api-definition
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

cs-api-definition
public static double DragStartDistance { get; set; }

Property Value

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

cs-api-definition
public static bool IsEnabled { get; set; }

Property Value

bool

IsTouchEnabled

Gets or sets a value indicating whether the TouchManager responds to any touch events.

Declaration

cs-api-definition
public static bool IsTouchEnabled { get; set; }

Property Value

bool

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

cs-api-definition
public static int MultiTapTime { get; set; }

Property Value

int

MultiTapVicinity

Gets or sets the maximum distance between two successive tap actions for the TouchManager to consider them multiple-taps.

Declaration

cs-api-definition
public static double MultiTapVicinity { get; set; }

Property Value

double

PinchStartDistance

Gets or sets the minimum distance a touch point has to move before the action is considered a pinch.

Declaration

cs-api-definition
public static double PinchStartDistance { get; set; }

Property Value

double

SwipeInertiaDuration

Gets or sets the duration of the swipe inertia, in milliseconds.

Declaration

cs-api-definition
public static int SwipeInertiaDuration { get; set; }

Property Value

int

SwipeStartDistance

Gets or sets the minimum distance a touch point has to move before the action is considered a swipe.

Declaration

cs-api-definition
public static double SwipeStartDistance { get; set; }

Property Value

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

cs-api-definition
public static int TapTime { get; set; }

Property Value

int

TapVicinity

Gets or sets the maximum distance a touch point can move for the action to be considered a tap.

Declaration

cs-api-definition
public static double TapVicinity { get; set; }

Property Value

double

Methods

AddDragEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the Drag event.

Declaration

cs-api-definition
public static void AddDragEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddDragFinishedEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the DragFinished event.

Declaration

cs-api-definition
public static void AddDragFinishedEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddDragStartedEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the DragStarted event. If this event is not handled, the Drag operation will finish.

Declaration

cs-api-definition
public static void AddDragStartedEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddLostTouchCaptureHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the LostTouchCapture event.

Declaration

cs-api-definition
public static void AddLostTouchCaptureHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddPinchEventHandler(UIElement, PinchEventHandler, bool)

Adds a handler for the Pinch event.

Declaration

cs-api-definition
public static void AddPinchEventHandler(UIElement element, PinchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

PinchEventHandler

handledEventsToo

bool

AddPinchFinishedEventHandler(UIElement, PinchEventHandler, bool)

Adds a handler for the PinchFinished event.

Declaration

cs-api-definition
public static void AddPinchFinishedEventHandler(UIElement element, PinchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

PinchEventHandler

handledEventsToo

bool

AddPinchStartedEventHandler(UIElement, PinchEventHandler, bool)

Adds a handler for the PinchStarted event.

Declaration

cs-api-definition
public static void AddPinchStartedEventHandler(UIElement element, PinchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

PinchEventHandler

handledEventsToo

bool

AddSwipeEventHandler(UIElement, SwipeEventHandler, bool)

Adds a handler for the Swipe event.

Declaration

cs-api-definition
public static void AddSwipeEventHandler(UIElement element, SwipeEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

SwipeEventHandler

handledEventsToo

bool

AddSwipeFinishedEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the SwipeFinished event.

Declaration

cs-api-definition
public static void AddSwipeFinishedEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddSwipeInertiaEventHandler(UIElement, SwipeInertiaEventHandler, bool)

Adds a handler for the SwipeInertia event.

Declaration

cs-api-definition
public static void AddSwipeInertiaEventHandler(UIElement element, SwipeInertiaEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

SwipeInertiaEventHandler

handledEventsToo

bool

AddSwipeInertiaFinishedEventHandler(UIElement, RadRoutedEventHandler, bool)

Adds a handler for the SwipeInertiaFinished event.

Declaration

cs-api-definition
public static void AddSwipeInertiaFinishedEventHandler(UIElement element, RadRoutedEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

RadRoutedEventHandler

handledEventsToo

bool

AddSwipeInertiaStartedEventHandler(UIElement, RadRoutedEventHandler, bool)

Adds a handler for the SwipeInertiaStarted event.

Declaration

cs-api-definition
public static void AddSwipeInertiaStartedEventHandler(UIElement element, RadRoutedEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

RadRoutedEventHandler

handledEventsToo

bool

AddSwipeStartedEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the SwipeStarted event.

Declaration

cs-api-definition
public static void AddSwipeStartedEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddTapAndHoldEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the TapAndHold event.

Declaration

cs-api-definition
public static void AddTapAndHoldEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddTapEventHandler(UIElement, TapEventHandler, bool)

Adds a handler for the Tap event.

Declaration

cs-api-definition
public static void AddTapEventHandler(UIElement element, TapEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TapEventHandler

handledEventsToo

bool

AddTapHoldAndReleaseEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the TapHoldAndRelease event.

Declaration

cs-api-definition
public static void AddTapHoldAndReleaseEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddTouchDownEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the TouchDown event.

Declaration

cs-api-definition
public static void AddTouchDownEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddTouchEnterEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the TouchEnter event.

Declaration

cs-api-definition
public static void AddTouchEnterEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddTouchLeaveEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the TouchLeave event.

Declaration

cs-api-definition
public static void AddTouchLeaveEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddTouchMoveEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the TouchMove event.

Declaration

cs-api-definition
public static void AddTouchMoveEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

AddTouchUpEventHandler(UIElement, TouchEventHandler, bool)

Adds a handler for the TouchUp event.

Declaration

cs-api-definition
public static void AddTouchUpEventHandler(UIElement element, TouchEventHandler handler, bool handledEventsToo = false)

Parameters

element

UIElement

handler

TouchEventHandler

handledEventsToo

bool

CaptureTouch(UIElement, TouchDevice)

Attempts to capture the touch device.

Declaration

cs-api-definition
public static bool CaptureTouch(UIElement element, TouchDevice touchDevice)

Parameters

element

UIElement

touchDevice

TouchDevice

Returns

bool

CeaseGestures(FrameworkElement)

Ceases the execution of any active gestures for elements within this root element. When root is null, all active gestures cease.

Declaration

cs-api-definition
public static void CeaseGestures(FrameworkElement root)

Parameters

root

FrameworkElement

GetCaptured(TouchDevice)

Gets the element that has captured the touch device.

Declaration

cs-api-definition
public static UIElement GetCaptured(TouchDevice touchDevice)

Parameters

touchDevice

TouchDevice

Returns

UIElement

GetDragStartTrigger(DependencyObject)

Gets a value indicating which action starts a drag operation.

Declaration

cs-api-definition
public static TouchDragStartTrigger GetDragStartTrigger(DependencyObject obj)

Parameters

obj

DependencyObject

Returns

TouchDragStartTrigger

GetScrollViewerSwipeMode(DependencyObject)

Gets the scroll viewer swipe mode.

Declaration

cs-api-definition
public static ScrollViewerSwipeMode GetScrollViewerSwipeMode(DependencyObject obj)

Parameters

obj

DependencyObject

Returns

ScrollViewerSwipeMode

GetShouldSuspendMousePromotion(DependencyObject)

Gets a value indicating whether mouse events should be suspended during touch input.

Declaration

cs-api-definition
public static bool GetShouldSuspendMousePromotion(DependencyObject obj)

Parameters

obj

DependencyObject

Returns

bool

GetTouchMode(DependencyObject)

Gets a value indicating the touch mode of the object.

Declaration

cs-api-definition
public static TouchMode GetTouchMode(DependencyObject obj)

Parameters

obj

DependencyObject

Returns

TouchMode

ReleaseTouchCapture(UIElement, TouchDevice)

Releases the touch capture.

Declaration

cs-api-definition
public static bool ReleaseTouchCapture(UIElement element, TouchDevice touchDevice)

Parameters

element

UIElement

touchDevice

TouchDevice

Returns

bool

RemoveDragEventHandler(UIElement, TouchEventHandler)

Removes the handler for the Drag event.

Declaration

cs-api-definition
public static void RemoveDragEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemoveDragFinishedEventHandler(UIElement, TouchEventHandler)

Removes the handler for the DragFinished event.

Declaration

cs-api-definition
public static void RemoveDragFinishedEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemoveDragStartedEventHandler(UIElement, TouchEventHandler)

Removes the handler for the DragStarted event.

Declaration

cs-api-definition
public static void RemoveDragStartedEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemoveLostTouchCaptureHandler(UIElement, TouchEventHandler)

Removes the handler for the LostTouchCapture event.

Declaration

cs-api-definition
public static void RemoveLostTouchCaptureHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemovePinchEventHandler(UIElement, PinchEventHandler)

Removes the handler for the Pinch event.

Declaration

cs-api-definition
public static void RemovePinchEventHandler(UIElement element, PinchEventHandler handler)

Parameters

element

UIElement

handler

PinchEventHandler

RemovePinchFinishedEventHandler(UIElement, PinchEventHandler)

Removes the handler for the PinchFinished event.

Declaration

cs-api-definition
public static void RemovePinchFinishedEventHandler(UIElement element, PinchEventHandler handler)

Parameters

element

UIElement

handler

PinchEventHandler

RemovePinchStartedEventHandler(UIElement, PinchEventHandler)

Removes the handler for the PinchStarted event.

Declaration

cs-api-definition
public static void RemovePinchStartedEventHandler(UIElement element, PinchEventHandler handler)

Parameters

element

UIElement

handler

PinchEventHandler

RemoveSwipeEventHandler(UIElement, SwipeEventHandler)

Removes the handler for the Swipe event.

Declaration

cs-api-definition
public static void RemoveSwipeEventHandler(UIElement element, SwipeEventHandler handler)

Parameters

element

UIElement

handler

SwipeEventHandler

RemoveSwipeFinishedEventHandler(UIElement, TouchEventHandler)

Removes the handler for the SwipeFinished event.

Declaration

cs-api-definition
public static void RemoveSwipeFinishedEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemoveSwipeInertiaEventHandler(UIElement, SwipeInertiaEventHandler)

Removes the handler for the SwipeInertia event.

Declaration

cs-api-definition
public static void RemoveSwipeInertiaEventHandler(UIElement element, SwipeInertiaEventHandler handler)

Parameters

element

UIElement

handler

SwipeInertiaEventHandler

RemoveSwipeInertiaFinishedEventHandler(UIElement, RadRoutedEventHandler)

Removes the handler for the SwipeInertiaFinished event.

Declaration

cs-api-definition
public static void RemoveSwipeInertiaFinishedEventHandler(UIElement element, RadRoutedEventHandler handler)

Parameters

element

UIElement

handler

RadRoutedEventHandler

RemoveSwipeInertiaStartedEventHandler(UIElement, RadRoutedEventHandler)

Removes the handler for the SwipeInertiaStarted event.

Declaration

cs-api-definition
public static void RemoveSwipeInertiaStartedEventHandler(UIElement element, RadRoutedEventHandler handler)

Parameters

element

UIElement

handler

RadRoutedEventHandler

RemoveSwipeStartedEventHandler(UIElement, TouchEventHandler)

Removes the handler for the SwipeStarted event.

Declaration

cs-api-definition
public static void RemoveSwipeStartedEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemoveTapAndHoldEventHandler(UIElement, TouchEventHandler)

Removes the handler for the TapAndHold event.

Declaration

cs-api-definition
public static void RemoveTapAndHoldEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemoveTapEventHandler(UIElement, TapEventHandler)

Removes the handler for the Tap event.

Declaration

cs-api-definition
public static void RemoveTapEventHandler(UIElement element, TapEventHandler handler)

Parameters

element

UIElement

handler

TapEventHandler

RemoveTapHoldAndReleaseEventHandler(UIElement, TouchEventHandler)

Removes the handler for the TapHoldAndRelease event.

Declaration

cs-api-definition
public static void RemoveTapHoldAndReleaseEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemoveTouchDownEventHandler(UIElement, TouchEventHandler)

Removes the handler for the TouchDown event.

Declaration

cs-api-definition
public static void RemoveTouchDownEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemoveTouchEnterEventHandler(UIElement, TouchEventHandler)

Removes the handler for the TouchEnter event.

Declaration

cs-api-definition
public static void RemoveTouchEnterEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemoveTouchLeaveEventHandler(UIElement, TouchEventHandler)

Removes the handler for the TouchLeave event.

Declaration

cs-api-definition
public static void RemoveTouchLeaveEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemoveTouchMoveEventHandler(UIElement, TouchEventHandler)

Removes the handler for the TouchMove event.

Declaration

cs-api-definition
public static void RemoveTouchMoveEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

RemoveTouchUpEventHandler(UIElement, TouchEventHandler)

Removes the handler for the TouchUp event.

Declaration

cs-api-definition
public static void RemoveTouchUpEventHandler(UIElement element, TouchEventHandler handler)

Parameters

element

UIElement

handler

TouchEventHandler

SetDragStartTrigger(DependencyObject, TouchDragStartTrigger)

Sets a value indicating which action starts a drag operation.

Declaration

cs-api-definition
public static void SetDragStartTrigger(DependencyObject obj, TouchDragStartTrigger value)

Parameters

obj

DependencyObject

value

TouchDragStartTrigger

SetScrollViewerSwipeMode(DependencyObject, ScrollViewerSwipeMode)

Sets the scroll viewer swipe mode.

Declaration

cs-api-definition
public static void SetScrollViewerSwipeMode(DependencyObject obj, ScrollViewerSwipeMode value)

Parameters

obj

DependencyObject

value

ScrollViewerSwipeMode

SetShouldSuspendMousePromotion(DependencyObject, bool)

Sets a value indicating whether mouse events should be suspended during touch input.

Declaration

cs-api-definition
public static void SetShouldSuspendMousePromotion(DependencyObject obj, bool value)

Parameters

obj

DependencyObject

value

bool

SetTouchMode(DependencyObject, TouchMode)

Sets a value indicating the touch mode of the object.

Declaration

cs-api-definition
public static void SetTouchMode(DependencyObject obj, TouchMode value)

Parameters

obj

DependencyObject

value

TouchMode

In this article
DefinitionFieldsDragStartTriggerPropertyScrollViewerSwipeModePropertyShouldSuspendMousePromotionPropertyTouchModePropertyPropertiesDragStartDistanceIsEnabledIsTouchEnabledMultiTapTimeMultiTapVicinityPinchStartDistanceSwipeInertiaDurationSwipeStartDistanceTapTimeTapVicinityMethodsAddDragEventHandler(UIElement, TouchEventHandler, bool)AddDragFinishedEventHandler(UIElement, TouchEventHandler, bool)AddDragStartedEventHandler(UIElement, TouchEventHandler, bool)AddLostTouchCaptureHandler(UIElement, TouchEventHandler, bool)AddPinchEventHandler(UIElement, PinchEventHandler, bool)AddPinchFinishedEventHandler(UIElement, PinchEventHandler, bool)AddPinchStartedEventHandler(UIElement, PinchEventHandler, bool)AddSwipeEventHandler(UIElement, SwipeEventHandler, bool)AddSwipeFinishedEventHandler(UIElement, TouchEventHandler, bool)AddSwipeInertiaEventHandler(UIElement, SwipeInertiaEventHandler, bool)AddSwipeInertiaFinishedEventHandler(UIElement, RadRoutedEventHandler, bool)AddSwipeInertiaStartedEventHandler(UIElement, RadRoutedEventHandler, bool)AddSwipeStartedEventHandler(UIElement, TouchEventHandler, bool)AddTapAndHoldEventHandler(UIElement, TouchEventHandler, bool)AddTapEventHandler(UIElement, TapEventHandler, bool)AddTapHoldAndReleaseEventHandler(UIElement, TouchEventHandler, bool)AddTouchDownEventHandler(UIElement, TouchEventHandler, bool)AddTouchEnterEventHandler(UIElement, TouchEventHandler, bool)AddTouchLeaveEventHandler(UIElement, TouchEventHandler, bool)AddTouchMoveEventHandler(UIElement, TouchEventHandler, bool)AddTouchUpEventHandler(UIElement, TouchEventHandler, bool)CaptureTouch(UIElement, TouchDevice)CeaseGestures(FrameworkElement)GetCaptured(TouchDevice)GetDragStartTrigger(DependencyObject)GetScrollViewerSwipeMode(DependencyObject)GetShouldSuspendMousePromotion(DependencyObject)GetTouchMode(DependencyObject)ReleaseTouchCapture(UIElement, TouchDevice)RemoveDragEventHandler(UIElement, TouchEventHandler)RemoveDragFinishedEventHandler(UIElement, TouchEventHandler)RemoveDragStartedEventHandler(UIElement, TouchEventHandler)RemoveLostTouchCaptureHandler(UIElement, TouchEventHandler)RemovePinchEventHandler(UIElement, PinchEventHandler)RemovePinchFinishedEventHandler(UIElement, PinchEventHandler)RemovePinchStartedEventHandler(UIElement, PinchEventHandler)RemoveSwipeEventHandler(UIElement, SwipeEventHandler)RemoveSwipeFinishedEventHandler(UIElement, TouchEventHandler)RemoveSwipeInertiaEventHandler(UIElement, SwipeInertiaEventHandler)RemoveSwipeInertiaFinishedEventHandler(UIElement, RadRoutedEventHandler)RemoveSwipeInertiaStartedEventHandler(UIElement, RadRoutedEventHandler)RemoveSwipeStartedEventHandler(UIElement, TouchEventHandler)RemoveTapAndHoldEventHandler(UIElement, TouchEventHandler)RemoveTapEventHandler(UIElement, TapEventHandler)RemoveTapHoldAndReleaseEventHandler(UIElement, TouchEventHandler)RemoveTouchDownEventHandler(UIElement, TouchEventHandler)RemoveTouchEnterEventHandler(UIElement, TouchEventHandler)RemoveTouchLeaveEventHandler(UIElement, TouchEventHandler)RemoveTouchMoveEventHandler(UIElement, TouchEventHandler)RemoveTouchUpEventHandler(UIElement, TouchEventHandler)SetDragStartTrigger(DependencyObject, TouchDragStartTrigger)SetScrollViewerSwipeMode(DependencyObject, ScrollViewerSwipeMode)SetShouldSuspendMousePromotion(DependencyObject, bool)SetTouchMode(DependencyObject, TouchMode)
Not finding the help you need?
Contact Support