Skip to main content

EventRoute Class

Definition​

Assembly:Avalonia.Base
Package:Avalonia

Holds the route for a routed event and supports raising an event on that route.

public class EventRoute

Inheritance: object -> EventRoute

Implements: IDisposable

Constructors​

NameDescription
EventRouteInitializes a new instance of the Avalonia.Interactivity.RoutedEvent class.

EventRoute Constructor​

Initializes a new instance of the Avalonia.Interactivity.RoutedEvent class.

public EventRoute(Avalonia.Interactivity.RoutedEvent e)

Parameters​

e Avalonia.Interactivity.RoutedEvent

The routed event to be raised.

Methods​

NameDescription
AddNo summary available.
AddClassHandlerAdds a class handler to the route.
DisposeDisposes of the event route.
RaiseEventRaises an event along the route.

Add Method​

public void Add(Avalonia.Interactivity.Interactive target, Delegate handler, Avalonia.Interactivity.RoutingStrategies routes, bool handledEventsToo, Action<Delegate, object, Avalonia.Interactivity.RoutedEventArgs> adapter)

Parameters​

target Avalonia.Interactivity.Interactive

handler Delegate

routes Avalonia.Interactivity.RoutingStrategies

handledEventsToo bool

adapter Action<Delegate, object, Avalonia.Interactivity.RoutedEventArgs>

AddClassHandler Method​

Adds a class handler to the route.

public void AddClassHandler(Avalonia.Interactivity.Interactive target)

Parameters​

target Avalonia.Interactivity.Interactive

The target on which the event should be raised.

Dispose Method​

Disposes of the event route.

public void Dispose()

RaiseEvent Method​

Raises an event along the route.

public void RaiseEvent(Avalonia.Interactivity.Interactive source, Avalonia.Interactivity.RoutedEventArgs e)

Parameters​

source Avalonia.Interactivity.Interactive

The event source.

e Avalonia.Interactivity.RoutedEventArgs

The event args.

Properties​

NameDescription
HasHandlersGets a value indicating whether the route has any handlers.

HasHandlers Property​

Gets a value indicating whether the route has any handlers.

public bool HasHandlers { get; set; }