UIBlockExtensions.AddGestureHandler
AddGestureHandler<TGesture, TVisuals>(UIBlock, UIEventHandler<TGesture, TVisuals>)
Subscribe to a gesture event on this UIBlock's descendant hierarchy (inclusive of this UIBlock), filtered to the given ItemVisuals type, TVisuals.
Remarks
The subscription only "lives" on this UIBlock, but the event will propagate up from descendents triggering gesture events with an gestureHandler type-matched signature.
Declaration
public static void AddGestureHandler<TGesture, TVisuals>(this UIBlock uiBlock, UIEventHandler<TGesture, TVisuals> gestureHandler)
where TGesture : struct, IGestureEvent where TVisuals : ItemVisuals
Parameters
| Type | Name | Description |
|---|---|---|
| UIBlock | uiBlock | |
| UIEventHandler<TGesture, TVisuals> | gestureHandler | The callback invoked when the event fires. |
Type Parameters
| Name | Description |
|---|---|
| TGesture | The type of gesture event to handle. |
| TVisuals | The ItemVisuals type to target as the event propagates. If no object of this type is in the event propogation path, the |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | If |