Class
GestureManager

A utility class that exposes methods that enable gesture management.

Definition

Namespace:Telerik.Windows.Input.Touch

Assembly:Telerik.Windows.Controls.dll

Syntax:

cs-api-definition
public static class GestureManager

Inheritance: objectGestureManager

Methods

ActivateGesture(UIElement, string, Action)

Activates the gesture for this element. If there is an active gesture, it is first forcibly deactivated.

Declaration

cs-api-definition
public static GestureDeactivationToken ActivateGesture(UIElement element, string gestureName, Action forcedFinish)

Parameters

element

UIElement

The UI element.

gestureName

string

The gesture name.

forcedFinish

Action

The callback that is executed when the gesture is forcibly deactivated.

Returns

GestureDeactivationToken

CanActivateGesture(UIElement, string)

Gets a value indicating whether the candidate gesture can be activated. The gesture cannot be activated if there is already an active gesture and the transition is not allowed.

Declaration

cs-api-definition
public static bool CanActivateGesture(UIElement element, string candidateGestureName)

Parameters

element

UIElement

candidateGestureName

string

Returns

bool

DeregisterGestureRecognizerFactory(IGestureRecognizerFactory)

Deregisters a gesture recognizer factory.

Declaration

cs-api-definition
public static void DeregisterGestureRecognizerFactory(IGestureRecognizerFactory gestureFactory)

Parameters

gestureFactory

IGestureRecognizerFactory

GetActiveGesture(UIElement)

Gets the name pf the active gesture for this element.

Declaration

cs-api-definition
public static string GetActiveGesture(UIElement element)

Parameters

element

UIElement

Returns

string

GetOrCreateGestureRecognizer<T>(UIElement)

Gets the gesture recognizer for this element.

Declaration

cs-api-definition
public static T GetOrCreateGestureRecognizer<T>(UIElement element) where T : GestureRecognizerBase

Parameters

element

UIElement

Returns

T

GetRegisteredGestureRecognizerFactories()

Gets the registered gesture recognizer factories.

Declaration

cs-api-definition
public static IList<IGestureRecognizerFactory> GetRegisteredGestureRecognizerFactories()

Returns

IList<IGestureRecognizerFactory>

GetRegisteredGestureTransitions(string)

Gets the allowed gesture transitions for this gesture.

Declaration

cs-api-definition
public static IEnumerable<string> GetRegisteredGestureTransitions(string gestureName)

Parameters

gestureName

string

Returns

IEnumerable<string>

IsGestureTransitionAllowed(string, string)

Gets a value indicating whether a transition is allowed.

Declaration

cs-api-definition
public static bool IsGestureTransitionAllowed(string activeGestureName, string candidateGestureName)

Parameters

activeGestureName

string

candidateGestureName

string

Returns

bool

RegisterGestureRecognizerFactory(IGestureRecognizerFactory)

Registers a gesture recognizer factory.

Declaration

cs-api-definition
public static void RegisterGestureRecognizerFactory(IGestureRecognizerFactory gestureFactory)

Parameters

gestureFactory

IGestureRecognizerFactory

RegisterGestureTransitions(string, IEnumerable<string>)

Registers the allowed transitions for this gesture.

Declaration

cs-api-definition
public static void RegisterGestureTransitions(string gestureName, IEnumerable<string> transitions)

Parameters

gestureName

string

transitions

IEnumerable<string>