Intersoft ClientUI Documentation
RegisterRoutedEvent Method



The name of the routed event. The name must be unique within the owner type and cannot be or an empty string.
The routing strategy of the event as a value of the enumeration.
The type of the event handler. This must be a delegate type and cannot be .
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.

Registers a new routed event with the ClientUI event architecture.

Syntax
Public Shared Function RegisterRoutedEvent( _
   ByVal name As String, _
   ByVal routingStrategy As RoutingStrategy, _
   ByVal handlerType As Type, _
   ByVal ownerType As Type _
) As RoutedEvent
Dim name As String
Dim routingStrategy As RoutingStrategy
Dim handlerType As Type
Dim ownerType As Type
Dim value As RoutedEvent
 
value = EventManager.RegisterRoutedEvent(name, routingStrategy, handlerType, ownerType)
public static RoutedEvent RegisterRoutedEvent( 
   string name,
   RoutingStrategy routingStrategy,
   Type handlerType,
   Type ownerType
)
public:
static RoutedEvent^ RegisterRoutedEvent( 
   String^ name,
   RoutingStrategy routingStrategy,
   Type^ handlerType,
   Type^ ownerType
) 

Parameters

name
The name of the routed event. The name must be unique within the owner type and cannot be or an empty string.
routingStrategy
The routing strategy of the event as a value of the enumeration.
handlerType
The type of the event handler. This must be a delegate type and cannot be .
ownerType
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.
Remarks

Use the return value of this method to create the static declaration for a unique RoutedEvent identifier field. This field should be stored within the owner type.

There are a considerable number of conventions and best practices associated with how routed events should be named, registered, and exposed in a class. For more information, see Routed Events Overview.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EventManager Class
EventManager Members

Send Feedback