InteractiveBuildEventRoute Method
Builds an event route for a routed event.
Namespace: Avalonia.InteractivityAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
protected EventRoute BuildEventRoute(
RoutedEvent e
)
Protected Function BuildEventRoute (
e As RoutedEvent
) As EventRoute
member BuildEventRoute :
e : RoutedEvent -> EventRoute
- e RoutedEvent
- The routed event.
EventRouteAn
EventRoute describing the route.
Usually, calling
RaiseEvent(RoutedEventArgs) is sufficient to raise a routed
event, however there are situations in which the construction of the event args is expensive
and should be avoided if there are no handlers for an event. In these cases you can call
this method to build the event route and check the
HasHandlers
property to see if there are any handlers registered on the route. If there are, call
RaiseEvent(Interactive, RoutedEventArgs) to raise the event.