CommandManager::RemoveCanExecuteHandler Method (UIElement^, CanExecuteRoutedEventHandler^)

 

Detaches the specified CanExecuteRoutedEventHandler from the specified element.

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public:
static void RemoveCanExecuteHandler(
	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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: