FREE TRIAL

|

☀
☾

UIBlock.AddGestureHandler

AddGestureHandler<TGesture>(UIEventHandler<TGesture>, bool)

Subscribe to a gesture event on this UIBlock and optionally on its descendent hierarchy, depending on the value of includeHierarchy.

Remarks

If includeHierarchy is true, gestureHandler will be invoked whenever the given gesture type is triggered on this UIBlock or one of its decendents.
If includeHierarchy is false, gestureHandler will be invoked only when the given gesture type occurs on this UIBlock directy.

Declaration
public void AddGestureHandler<TGesture>(UIEventHandler<TGesture> gestureHandler, bool includeHierarchy = true)
    where TGesture : struct, IGestureEvent
Parameters
Type Name Description
UIEventHandler<TGesture> gestureHandler

The callback invoked when the gesture event fires.

bool includeHierarchy

Capture gestures from the descendent hierarchy or scope to this this UIBlock directy.

Type Parameters
Name Description
TGesture

The type of gesture event to handle.

Exceptions
Type Condition
System.ArgumentNullException

If gestureHandler is null.

See Also
Gesture.OnClick
Gesture.OnPress
Gesture.OnRelease
Gesture.OnHover
Gesture.OnUnhover
Gesture.OnScroll
Gesture.OnMove
Gesture.OnDrag
Gesture.OnCancel
FireGestureEvent<TGesture>(TGesture)
☀
☾
In This Article
Legal EmailContact Github
Copyright © 2022 Supernova Technologies, LLC