Class
EventManager

Provides event-related utility methods that register routed events for class owners and add class handlers.

Definition

Namespace:Telerik.UI.Xaml

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
public static class EventManager

Inheritance: objectEventManager

Methods

RegisterClassHandler(Type, RoutedEvent, Delegate)

Registers a class handler for a particular routed event.

Declaration

cs-api-definition
public static void RegisterClassHandler(Type classType, RoutedEvent routedEvent, Delegate handler)

Parameters

classType

Type

routedEvent

RoutedEvent

handler

Delegate

RegisterClassHandler(Type, RoutedEvent, Delegate, bool)

Registers a class handler for a particular routed event, with the option to handle events where event data is already marked handled.

Declaration

cs-api-definition
public static void RegisterClassHandler(Type classType, RoutedEvent routedEvent, Delegate handler, bool handledEventsToo)

Parameters

classType

Type

The type of the class that is declaring class handling.

routedEvent

RoutedEvent

The routed event identifier of the event to handle.

handler

Delegate

A reference to the class handler implementation.

handledEventsToo

bool

True to invoke this class handler even if arguments of the routed event have been marked as handled; false to retain the default behavior of not invoking the handler on any marked-handled event.

RegisterRoutedEvent(string, RoutingStrategy, Type, Type)

Registers a new routed event with the event system.

Declaration

cs-api-definition
public static RoutedEvent RegisterRoutedEvent(string name, RoutingStrategy routingStrategy, Type handlerType, Type ownerType)

Parameters

name

string

The name of the routed event. The name must be unique within the owner type and cannot be null (Nothing in Visual Basic) or an empty string.

routingStrategy

RoutingStrategy

The routing strategy of the event as a value of the enumeration.

handlerType

Type

The type of the event handler. This must be a delegate type and cannot be null (Nothing in Visual Basic).

ownerType

Type

The owner class type of the routed event. This cannot be null (Nothing in Visual Basic).

Returns

RoutedEvent

The identifier for the newly registered routed event. This identifier object can now be stored as a static field in a class and then used as a parameter for methods that attach handlers to the event. The routed event identifier is also used for other event system APIs.