Class EventManager
Provides event-related utility methods that register routed events for class owners and add class handlers.
Inheritance
Namespace: Telerik.Windows
Assembly: Telerik.Windows.Controls.dll
Syntax
public static class EventManager : Object
Methods
RegisterClassHandler(Type, RoutedEvent, Delegate)
Registers a class handler for a particular routed event.
Declaration
public static void RegisterClassHandler(Type classType, RoutedEvent routedEvent, Delegate handler)
Parameters
System.Type
classType
|
RoutedEvent
routedEvent
|
System.Delegate
handler
|
RegisterClassHandler(Type, RoutedEvent, Delegate, Boolean)
Registers a class handler for a particular routed event, with the option to handle events where event data is already marked handled.
Declaration
public static void RegisterClassHandler(Type classType, RoutedEvent routedEvent, Delegate handler, bool handledEventsToo)
Parameters
System.Type
classType
The type of the class that is declaring class handling. |
RoutedEvent
routedEvent
The routed event identifier of the event to handle. |
System.Delegate
handler
A reference to the class handler implementation. |
System.Boolean
handledEventsToo
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 Silverlight event system.
Declaration
public static RoutedEvent RegisterRoutedEvent(string name, RoutingStrategy routingStrategy, Type handlerType, Type ownerType)
Parameters
System.String
name
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. |
System.Type
handlerType
The type of the event handler. This must be a delegate type and cannot be null (Nothing in Visual Basic). |
System.Type
ownerType
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. |