EventRoute.

Add(IInteractive, Delegate, RoutingStrategies, bool, Action<Delegate, object, RoutedEventArgs>?) Method

Summary

Adds a handler to the route.
Namespace
Avalonia.Interactivity
Containing Type
EventRoute

Syntax

public void Add(IInteractive target, Delegate handler, RoutingStrategies routes, bool handledEventsToo = false, Action<Delegate, object, RoutedEventArgs>? adapter = null)

Parameters

Name Type Description
target IInteractive The target on which the event should be raised.
handler Delegate The handler for the event.
routes RoutingStrategies The routing strategies to listen to.
handledEventsToo bool If true the handler will be raised even when the routed event is marked as handled.
adapter Action<Delegate, object, RoutedEventArgs>? An optional adapter which if supplied, will be called with handler and the parameters for the event. This adapter can be used to avoid calling `DynamicInvoke` on the handler.

Return Value

Type Description
void