CommandManager::RemovePreviewCanExecuteHandler Method (UIElement^, CanExecuteRoutedEventHandler^)
.NET Framework (current version)
Detaches the specified CanExecuteRoutedEventHandler from the specified element.
Assembly: PresentationCore (in PresentationCore.dll)
public: static void RemovePreviewCanExecuteHandler( UIElement^ element, CanExecuteRoutedEventHandler^ handler )
Parameters
- element
-
Type:
System.Windows::UIElement^
The element to remove handler from.
- handler
-
Type:
System.Windows.Input::CanExecuteRoutedEventHandler^
The can execute 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: