EventRouteAdd Method
Adds a handler to the route.
Namespace: Avalonia.InteractivityAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public void Add(
Interactive target,
Delegate handler,
RoutingStrategies routes,
bool handledEventsToo = false,
Action<Delegate, Object, RoutedEventArgs>? adapter = null
)
Public Sub Add (
target As Interactive,
handler As Delegate,
routes As RoutingStrategies,
Optional handledEventsToo As Boolean = false,
Optional adapter As Action(Of Delegate, Object, RoutedEventArgs) = Nothing
)
member Add :
target : Interactive *
handler : Delegate *
routes : RoutingStrategies *
?handledEventsToo : bool *
?adapter : Action<Delegate, Object, RoutedEventArgs>
(* Defaults:
let _handledEventsToo = defaultArg handledEventsToo false
let _adapter = defaultArg adapter null
*)
-> unit
Parameters
- target Interactive
- 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 Boolean (Optional)
-
If true the handler will be raised even when the routed event is marked as handled.
- adapter ActionDelegate, Object, RoutedEventArgs (Optional)
-
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.