IInputElementAddHandler Method
Adds a handler for the specified routed event.
Namespace: Avalonia.InputAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
void AddHandler(
RoutedEvent routedEvent,
Delegate handler,
RoutingStrategies routes = RoutingStrategies.Direct|RoutingStrategies.Bubble,
bool handledEventsToo = false
)
Sub AddHandler (
routedEvent As RoutedEvent,
handler As Delegate,
Optional routes As RoutingStrategies = RoutingStrategies.Direct Or RoutingStrategies.Bubble,
Optional handledEventsToo As Boolean = false
)
abstract AddHandler :
routedEvent : RoutedEvent *
handler : Delegate *
?routes : RoutingStrategies *
?handledEventsToo : bool
(* Defaults:
let _routes = defaultArg routes RoutingStrategies.Direct|RoutingStrategies.Bubble
let _handledEventsToo = defaultArg handledEventsToo false
*)
-> unit
- routedEvent RoutedEvent
- The routed event.
- handler Delegate
- The handler.
- routes RoutingStrategies (Optional)
- The routing strategies to listen to.
- handledEventsToo Boolean (Optional)
- Whether handled events should also be listened for.
A disposable that terminates the event subscription.