CommandManager.RemovePreviewExecutedHandler Método

Definición

Desasocia el ExecutedRoutedEventHandler especificado del elemento especificado.

public:
 static void RemovePreviewExecutedHandler(System::Windows::UIElement ^ element, System::Windows::Input::ExecutedRoutedEventHandler ^ handler);
public static void RemovePreviewExecutedHandler (System.Windows.UIElement element, System.Windows.Input.ExecutedRoutedEventHandler handler);
static member RemovePreviewExecutedHandler : System.Windows.UIElement * System.Windows.Input.ExecutedRoutedEventHandler -> unit
Public Shared Sub RemovePreviewExecutedHandler (element As UIElement, handler As ExecutedRoutedEventHandler)

Parámetros

element
UIElement

Elemento del que se va a quitar handler.

handler
ExecutedRoutedEventHandler

Controlador ejecutado.

Excepciones

element o handler es null.

Ejemplos

En el ejemplo siguiente se desasocia un CanExecuteRoutedEventHandler elemento y un objeto ExecutedRoutedEventHandler que se había adjuntado previamente a .Button

CommandManager.RemoveExecutedHandler(helpButton, HelpCmdExecuted);
CommandManager.RemoveCanExecuteHandler(helpButton, HelpCmdCanExecute);
CommandManager.RemoveExecutedHandler(helpButton, AddressOf HelpCmdExecuted)
CommandManager.RemoveCanExecuteHandler(helpButton, AddressOf HelpCmdCanExecute)

Se aplica a

Consulte también