Class DependencyObjectExtensions
Static class that contains extension methods for the Dependency object.
Inheritance
Namespace: Telerik.Windows
Assembly: Telerik.Windows.Controls.dll
Syntax
public static class DependencyObjectExtensions : Object
Methods
AddHandler(DependencyObject, RoutedEvent, Delegate)
Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element.
Declaration
public static void AddHandler(this DependencyObject element, RoutedEvent routedEvent, Delegate handler)
Parameters
System.Windows.DependencyObject
element
The element. |
RoutedEvent
routedEvent
An identifier for the routed event to be handled. |
System.Delegate
handler
A reference to the handler implementation. |
AddHandler(DependencyObject, RoutedEvent, Delegate, Boolean)
Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element.
Declaration
public static void AddHandler(this DependencyObject element, RoutedEvent routedEvent, Delegate handler, bool handlesToo)
Parameters
System.Windows.DependencyObject
element
The element. |
RoutedEvent
routedEvent
An identifier for the routed event to be handled. |
System.Delegate
handler
A reference to the handler implementation. |
System.Boolean
handlesToo
True to register the handler such that it is invoked even when the routed event is marked handled in its event data; false to register the handler with the default condition that it will not be invoked if the routed event is already marked handled. |
RaiseEvent(DependencyObject, RadRoutedEventArgs)
Raises a specific routed event. The RoutedEvent to be raised is identified within the RoutedEventArgs instance that is provided (as the RoutedEvent property of that event data).
Declaration
public static void RaiseEvent(this DependencyObject element, RadRoutedEventArgs e)
Parameters
System.Windows.DependencyObject
element
The element. |
RadRoutedEventArgs
e
The RadRoutedEventArgs instance containing the event data and also identifies the event to raise. |
RemoveHandler(DependencyObject, RoutedEvent, Delegate)
Removes the specified routed event handler from this element.
Declaration
public static void RemoveHandler(this DependencyObject element, RoutedEvent routedEvent, Delegate handler)
Parameters
System.Windows.DependencyObject
element
The element. |
RoutedEvent
routedEvent
The identifier of the routed event for which the handler is attached. |
System.Delegate
handler
The specific handler implementation to remove from the event handler collection on this element. |