CommandManager.RemoveExecutedHandler Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Detaches the specified ExecutedRoutedEventHandler from the specified element.
public:
static void RemoveExecutedHandler(System::Windows::UIElement ^ element, System::Windows::Input::ExecutedRoutedEventHandler ^ handler);
public static void RemoveExecutedHandler (System.Windows.UIElement element, System.Windows.Input.ExecutedRoutedEventHandler handler);
static member RemoveExecutedHandler : System.Windows.UIElement * System.Windows.Input.ExecutedRoutedEventHandler -> unit
Public Shared Sub RemoveExecutedHandler (element As UIElement, handler As ExecutedRoutedEventHandler)
Parameters
- element
- UIElement
The element to remove handler
from.
- handler
- ExecutedRoutedEventHandler
The executed handler.
Exceptions
element
or handler
is null
.
Examples
The following example detaches a CanExecuteRoutedEventHandler and an ExecutedRoutedEventHandler which had previously been attached to a Button.
CommandManager.RemoveExecutedHandler(helpButton, HelpCmdExecuted);
CommandManager.RemoveCanExecuteHandler(helpButton, HelpCmdCanExecute);
CommandManager.RemoveExecutedHandler(helpButton, AddressOf HelpCmdExecuted)
CommandManager.RemoveCanExecuteHandler(helpButton, AddressOf HelpCmdCanExecute)
Applies to
See also
Surađujte s nama na GitHubu
Izvor za ovaj sadržaj možete pronaći na GitHubu, gdje možete stvarati i pregledavati probleme i zahtjeve za povlačenjem. Dodatne informacije potražite u našem vodiču za suradnike.