IInputElementAddHandler Method

Adds a handler for the specified routed event.

Definition

Namespace: Avalonia.Input
Assembly: 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
)

Parameters

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.

Return Value

A disposable that terminates the event subscription.

See Also