Class GestureManager
A utility class that exposes methods that enable gesture management.
Inheritance
Namespace: Telerik.Windows.Input.Touch
Assembly: Telerik.Windows.Controls.dll
Syntax
public static class GestureManager : Object
Methods
ActivateGesture(UIElement, String, Action)
Activates the gesture for this element. If there is an active gesture, it is first forcibly deactivated.
Declaration
public static GestureDeactivationToken ActivateGesture(UIElement element, string gestureName, Action forcedFinish)
Parameters
System.Windows.UIElement
element
The UI element. |
System.String
gestureName
The gesture name. |
System.Action
forcedFinish
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
public static bool CanActivateGesture(UIElement element, string candidateGestureName)
Parameters
System.Windows.UIElement
element
|
System.String
candidateGestureName
|
Returns
System.Boolean
|
DeregisterGestureRecognizerFactory(IGestureRecognizerFactory)
Deregisters a gesture recognizer factory.
Declaration
public static void DeregisterGestureRecognizerFactory(IGestureRecognizerFactory gestureFactory)
Parameters
IGestureRecognizerFactory
gestureFactory
|
GetActiveGesture(UIElement)
Gets the name pf the active gesture for this element.
Declaration
public static string GetActiveGesture(UIElement element)
Parameters
System.Windows.UIElement
element
|
Returns
System.String
|
GetOrCreateGestureRecognizer<T>(UIElement)
Gets the gesture recognizer for this element.
Declaration
public static T GetOrCreateGestureRecognizer<T>(UIElement element)
where T : GestureRecognizerBase
Parameters
System.Windows.UIElement
element
|
Returns
T
|
Type Parameters
T
|
GetRegisteredGestureRecognizerFactories()
Gets the registered gesture recognizer factories.
Declaration
public static IList<IGestureRecognizerFactory> GetRegisteredGestureRecognizerFactories()
Returns
System.Collections.Generic.IList<IGestureRecognizerFactory>
|
GetRegisteredGestureTransitions(String)
Gets the allowed gesture transitions for this gesture.
Declaration
public static IEnumerable<string> GetRegisteredGestureTransitions(string gestureName)
Parameters
System.String
gestureName
|
Returns
System.Collections.Generic.IEnumerable<System.String>
|
IsGestureTransitionAllowed(String, String)
Gets a value indicating whether a transition is allowed.
Declaration
public static bool IsGestureTransitionAllowed(string activeGestureName, string candidateGestureName)
Parameters
System.String
activeGestureName
|
System.String
candidateGestureName
|
Returns
System.Boolean
|
RegisterGestureRecognizerFactory(IGestureRecognizerFactory)
Registers a gesture recognizer factory.
Declaration
public static void RegisterGestureRecognizerFactory(IGestureRecognizerFactory gestureFactory)
Parameters
IGestureRecognizerFactory
gestureFactory
|
RegisterGestureTransitions(String, IEnumerable<String>)
Registers the allowed transitions for this gesture.
Declaration
public static void RegisterGestureTransitions(string gestureName, IEnumerable<string> transitions)
Parameters
System.String
gestureName
|
System.Collections.Generic.IEnumerable<System.String>
transitions
|