New to Telerik UI for WPFStart a free 30-day trial

A utility class that exposes methods that enable gesture management.

Definition

Namespace:Telerik.Windows.Input.Touch

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public static class GestureManager

Inheritance: objectGestureManager

Methods

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

C#
public static GestureDeactivationToken ActivateGesture(UIElement element, string gestureName, Action forcedFinish)
Parameters:elementUIElement

The UI element.

gestureNamestring

The gesture name.

forcedFinishAction

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

Returns:

GestureDeactivationToken

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.

C#
public static bool CanActivateGesture(UIElement element, string candidateGestureName)
Parameters:elementUIElementcandidateGestureNamestringReturns:

bool

Deregisters a gesture recognizer factory.

C#
public static void DeregisterGestureRecognizerFactory(IGestureRecognizerFactory gestureFactory)
Parameters:gestureFactoryIGestureRecognizerFactory

Gets the name pf the active gesture for this element.

C#
public static string GetActiveGesture(UIElement element)
Parameters:elementUIElementReturns:

string

Gets the gesture recognizer for this element.

C#
public static T GetOrCreateGestureRecognizer<T>(UIElement element) where T : GestureRecognizerBase
Parameters:elementUIElementReturns:

T

Gets the registered gesture recognizer factories.

C#
public static IList<IGestureRecognizerFactory> GetRegisteredGestureRecognizerFactories()
Returns:

IList<IGestureRecognizerFactory>

Gets the allowed gesture transitions for this gesture.

C#
public static IEnumerable<string> GetRegisteredGestureTransitions(string gestureName)
Parameters:gestureNamestringReturns:

IEnumerable<string>

Gets a value indicating whether a transition is allowed.

C#
public static bool IsGestureTransitionAllowed(string activeGestureName, string candidateGestureName)
Parameters:activeGestureNamestringcandidateGestureNamestringReturns:

bool

Registers a gesture recognizer factory.

C#
public static void RegisterGestureRecognizerFactory(IGestureRecognizerFactory gestureFactory)
Parameters:gestureFactoryIGestureRecognizerFactory

Registers the allowed transitions for this gesture.

C#
public static void RegisterGestureTransitions(string gestureName, IEnumerable<string> transitions)
Parameters:gestureNamestringtransitionsIEnumerable<string>