CommandBinding 클래스

정의

RoutedCommand를 명령을 구현하는 이벤트 처리기에 바인딩합니다.

public ref class CommandBinding
public class CommandBinding
type CommandBinding = class
Public Class CommandBinding
상속
CommandBinding

설명

A CommandBinding 와 명령을 연결 합니다 PreviewExecuted/ExecutedPreviewCanExecute/CanExecute 이벤트 구현 하 고 명령의 상태를 확인 합니다.

때를 Execute 또는 CanExecute 메서드의 RoutedCommand 호출 되는 PreviewExecuted/Executed 또는 PreviewCanExecute/CanExecute 명령 대상에서 이벤트가 발생 합니다. 명령 대상에는 CommandBinding 명령에 대 한 적절 한 처리기가 호출 됩니다. 명령 대상에 없는 경우는 CommandBinding 명령에 대 한 이벤트를 통해 라우팅됩니다 요소 트리를 가진 요소가 될 때까지 CommandBinding 를 찾을 수 있습니다.

A CommandBinding 제한적으로 사용 하 여 사용 하 여는 ICommand 하지 않은 RoutedCommand입니다. 때문에 이것이 CommandBinding 명령에 바인딩합니다를 ExecutedRoutedEventHandlerCanExecuteRoutedEventHandler 수신 대기 하는 ExecutedCanExecute 라우트된 이벤트는 때 발생 합니다 ExecuteCanExecute 메서드의 합니다 RoutedCommand이라고 합니다.

생성자

CommandBinding()

CommandBinding 클래스의 새 인스턴스를 초기화합니다.

CommandBinding(ICommand)

지정된 CommandBinding을 사용하여 ICommand 클래스의 새 인스턴스를 초기화합니다.

CommandBinding(ICommand, ExecutedRoutedEventHandler)

지정된 CommandBindingICommand 이벤트 처리기를 사용하여 Executed 클래스의 새 인스턴스를 초기화합니다.

CommandBinding(ICommand, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler)

지정된 CommandBinding와 지정된 ICommandExecuted 이벤트 처리기를 사용하여 CanExecute 클래스의 새 인스턴스를 초기화합니다.

속성

Command

ICommand에 연결된 CommandBinding를 가져오거나 설정합니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

이벤트

CanExecute

명령 대상에서 이 CommandBinding에 연결된 명령을 실행할 수 있는지 여부를 결정하는 검사를 시작하면 발생합니다.

Executed

CommandBinding 에 연결된 명령이 실행되면 발생합니다.

PreviewCanExecute

현재 명령 대상에서 이 CommandBinding 에 연결된 명령을 실행할 수 있는지 여부를 확인하는 검사를 시작하면 발생합니다.

PreviewExecuted

CommandBinding 에 연결된 명령이 실행되면 발생합니다.

적용 대상

추가 정보