Edit this page

Features

Here you can find common information about the properties and methods of TouchManager.

Properties

TouchManager exposes the following public properties:

  • IsTouchEnabled: A static property of type bool that indicates whether the TouchManager will respond to any touch events. It can be used to enable or disable the touch interactions with the elements that use the TouchManager.

  • TouchMode: An attached property of type Telerik.Windows.Input.Touch.TouchMode enumeration that gets or sets the touch mode of the control. You can read more about the property in the Touch Modes help article.

  • ScrollViewerSwipeMode: An attached property of type Telerik.Windows.Input.Touch.ScrollViewerSwipeMode enumeration that gets or sets the mode that defines the additional swipe logic for a ScrollViewer or an element in a ScrollViewer. The enumeration contains the following modes.

    • None (default): The element does not have additional logic for swiping.
    • Self: If an unhandled swipe gesture occurs, the ScrollViewer will get panned. > The element on which this value is set should be a ScrollViewer. Otherwise, an exception will be thrown.
    • Parent: If an unhandled swipe gesture occurs for this element, the first ScrollViewer parent will get panned.

    Example 1: Setting ScrollViewerSwipeMode in XAML

        <ListBox x:Name="element" telerik:TouchManager.ScrollViewerSwipeMode="Parent">
    


    Example 2: Setting ScrollViewerSwipeMode in code

        TouchManager.SetScrollViewerSwipeMode(this.element, ScrollViewerSwipeMode.Parent);
    
        TouchManager.SetScrollViewerSwipeMode(Me.element, ScrollViewerSwipeMode.Parent);
    
  • ShouldSuspendMousePromotion: An attached property of type bool that indicates whether mouse events should be suspended during touch input.

  • DragStartDistance: A static property of type double that gets or sets the minimum distance a touch point has to move before the action is considered a drag. The distance is measured in pixels.

  • PinchStartDistance: A static property of type double that gets or sets the minimum distance a touch point has to move before the action is considered a pinch. The distance is measured in pixels.

  • SwipeStartDistance: A static property of type double that gets or sets the minimum distance a touch point has to move before the action is considered a swipe. The distance is measured in pixels.

  • SwipeInertiaDuration: A static property of type int that gets or sets the duration of the swipe inertia. The duration is measured in milliseconds.

  • TapTime: A static property of type int that gets or sets the time that can elapse between a touch down and a touch up for the action to be considered a tap. The time is measured in milliseconds.

  • TapVicinity: A static property of type double that gets or sets the maximum distance a touch point can move for the action to be considered a tab. The distance is measured in pixels.

  • MultiTapTime: A static property of type int that gets or sets the time that can elapse between two successive tap actions for the TouchManager to consider them as multiple taps. The time is measured in milliseconds.

  • MultiTapVicinity: A static property of type int that gets or sets the distance between two successive tap actions for the TouchManager to consider them as multiple taps. The distance is measured in pixels.

  • DragStartTrigger: An attached property of type Telerik.Windows.Input.Touch.TouchDragStartTrigger enumeration that gets or sets the touch action that triggers the drag operation. The enumeration contains the following triggers.

    • TapHoldAndMove: The drag operation will be triggered during a TouchMove event after a TapAndHold.
    • TouchMove: The drag operation will be triggered during a TouchMove, regardless of whether a TapAndHold event has occured or not.
    • TapAndHold (default): The drag operation will be triggered during a TapAndHold event.

    Example 3: Setting DragStartTrigger in XAML

        <Border x:Name="element" telerik:TouchManager.DragStartTrigger="TapHoldAndMove">
    


    Example 4: Setting DragStartTrigger in code

        TouchManager.SetDragStartTrigger(this.element, TouchDragStartTrigger.TapHoldAndMove);
    
        TouchManager.SetDragStartTrigger(Me.element, TouchDragStartTrigger.TapHoldAndMove);
    

The IsTouchHitTestVisibility property is obsolete and replaced by the TouchMode property.

Methods

TouchManager exposes the following methods:

  • CeaseGestures: This method ceases the execution of any active gestures for elements within the root UIElement.

  • CaptureTouch: This method attempts to capture the touch device.

  • ReleaseTouchCapture: This method releases the captured touch device.

  • GetCaptured: This method gets the UIElement that has captured the touch device.

Touch Indicator

TouchManager visualizes an animated touch indicator when there is a tap and hold gesture performed on the screen.

The indicator supports theming and it will have a different appearance in the different themes.

See Also