CommandManager::RemoveExecutedHandler Method (UIElement^, ExecutedRoutedEventHandler^)
.NET Framework (current version)
Detaches the specified ExecutedRoutedEventHandler from the specified element.
Assembly: PresentationCore (in PresentationCore.dll)
public: static void RemoveExecutedHandler( UIElement^ element, ExecutedRoutedEventHandler^ handler )
Parameters
- element
-
Type:
System.Windows::UIElement^
The element to remove handler from.
- handler
-
Type:
System.Windows.Input::ExecutedRoutedEventHandler^
The executed handler.
| Exception | Condition |
|---|---|
| ArgumentNullException | element or handler is null. |
The following example detaches a CanExecuteRoutedEventHandler and an ExecutedRoutedEventHandler which had previously been attached to a Button.
.NET Framework
Available since 3.0
Available since 3.0
Show: