CommandManager.RemovePreviewExecutedHandler 메서드

정의

지정된 요소에서 지정된 ExecutedRoutedEventHandler를 분리합니다.

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)

매개 변수

element
UIElement

handler를 제거할 요소입니다.

handler
ExecutedRoutedEventHandler

실행된 처리기입니다.

예외

element 또는 handlernull인 경우

예제

다음 예제에서는 분리를 CanExecuteRoutedEventHandlerExecutedRoutedEventHandler 에 연결 된 이전에는 Button합니다.

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

적용 대상

추가 정보