Intersoft ClientUI Documentation
RegisterClassHandler(Type,RoutedEvent,Delegate,Boolean) Method
See Also  Send Feedback
Intersoft.Client.Framework Namespace > EventManager Class > RegisterClassHandler Method : RegisterClassHandler(Type,RoutedEvent,Delegate,Boolean) Method






classType
The type of the class that is declaring class handling.
routedEvent
The routed event identifier of the event to handle.
handler
A reference to the class handler implementation.
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.
Registers a class handler for a particular routed event, with the option to handle events where event data is already marked handled.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Sub RegisterClassHandler( _
   ByVal classType As Type, _
   ByVal routedEvent As RoutedEvent, _
   ByVal handler As Delegate, _
   ByVal handledEventsToo As Boolean _
) 
Visual Basic (Usage)Copy Code
Dim classType As Type
Dim routedEvent As RoutedEvent
Dim handler As Delegate
Dim handledEventsToo As Boolean
 
EventManager.RegisterClassHandler(classType, routedEvent, handler, handledEventsToo)
C# 
public static void RegisterClassHandler( 
   Type classType,
   RoutedEvent routedEvent,
   Delegate handler,
   bool handledEventsToo
)
Delphi 
public procedure RegisterClassHandler( 
    classType: Type;
    routedEvent: RoutedEvent;
    handler: Delegate;
    handledEventsToo: Boolean
); static; 
JScript 
public static function RegisterClassHandler( 
   classType : Type,
   routedEvent : RoutedEvent,
   handler : Delegate,
   handledEventsToo : boolean
);
Managed Extensions for C++ 
public: static void RegisterClassHandler( 
   Type* classType,
   RoutedEvent* routedEvent,
   Delegate* handler,
   bool handledEventsToo
) 
C++/CLI 
public:
static void RegisterClassHandler( 
   Type^ classType,
   RoutedEvent^ routedEvent,
   Delegate^ handler,
   bool handledEventsToo
) 

Parameters

classType
The type of the class that is declaring class handling.
routedEvent
The routed event identifier of the event to handle.
handler
A reference to the class handler implementation.
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.

Remarks

Routed events can be handled either by class handlers or instance handlers on any given node in the route. Class handlers are invoked first, and can be used by class implementations to suppress events from instance handling or introduce other event specific behaviors on events that are owned by base classes.

One of the most common scenarios in working with a routed event is to use class handlers to handle multiple instances of objects in certain node of the visual tree which type is already known to be traversed by the routed event.

For more information, see Routed Events Overview.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.