CommandManager Class

Definition

CommandBindingInputBinding 개체를 클래스 소유자 및 명령에 등록하고 명령 이벤트 처리기를 추가 및 제거하며 명령 상태를 쿼리하는 서비스를 제공하는 명령 관련 유틸리티 메서드를 제공합니다.Provides command related utility methods that register CommandBinding and InputBinding objects for class owners and commands, add and remove command event handlers, and provides services for querying the status of a command.

public ref class CommandManager sealed
public sealed class CommandManager
type CommandManager = class
Public NotInheritable Class CommandManager
Inheritance
CommandManager

Remarks

CommandManager 는 라우트된 명령을 관리 합니다.The CommandManager is responsible for managing routed commands. 명령에 대 한 자세한 내용은 참조 하세요. 명령 개요합니다.For more information about commanding, see Commanding Overview.

사용 하 여 RegisterClassCommandBinding 등록 하는 CommandBinding 인스턴스가 아닌 클래스에 있습니다.Use RegisterClassCommandBinding to register a CommandBinding to a class as opposed to an instance.

사용 하 여 RegisterClassInputBinding 등록 하는 InputBinding 인스턴스가 아닌 클래스에 있습니다.Use RegisterClassInputBinding to register an InputBinding to a class as opposed to an instance.

InvalidateRequerySuggested 메서드는 CommandManagerRequerySuggested 이벤트를 발생시키도록 합니다.The InvalidateRequerySuggested method forces the CommandManager to raise the RequerySuggested event. RequerySuggested 이벤트 쿼리 명령을 실행할 수 있는지 여부를 확인 하려면 연관 된 명령에 명령 소스에 알립니다.The RequerySuggested event informs a command source to query the command it is associated with to determine whether or not the command can execute.

Fields

CanExecuteEvent

CanExecute 연결된 이벤트를 식별합니다.Identifies the CanExecute attached event.

ExecutedEvent

Executed 연결된 이벤트를 식별합니다.Identifies the Executed attached event.

PreviewCanExecuteEvent

PreviewCanExecute 연결된 이벤트를 식별합니다.Identifies the PreviewCanExecute attached event.

PreviewExecutedEvent

PreviewExecuted 연결된 이벤트를 식별합니다.Identifies the PreviewExecuted attached event.

Methods

AddCanExecuteHandler(UIElement, CanExecuteRoutedEventHandler)

지정된 CanExecuteRoutedEventHandler를 지정된 요소에 연결합니다.Attaches the specified CanExecuteRoutedEventHandler to the specified element.

AddExecutedHandler(UIElement, ExecutedRoutedEventHandler)

지정된 ExecutedRoutedEventHandler를 지정된 요소에 연결합니다.Attaches the specified ExecutedRoutedEventHandler to the specified element.

AddPreviewCanExecuteHandler(UIElement, CanExecuteRoutedEventHandler)

지정된 CanExecuteRoutedEventHandler를 지정된 요소에 연결합니다.Attaches the specified CanExecuteRoutedEventHandler to the specified element.

AddPreviewExecutedHandler(UIElement, ExecutedRoutedEventHandler)

지정된 ExecutedRoutedEventHandler를 지정된 요소에 연결합니다.Attaches the specified ExecutedRoutedEventHandler to the specified element.

Equals(Object)

지정한 개체와 현재 개체가 같은지 여부를 확인합니다.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

기본 해시 함수로 작동합니다.Serves as the default hash function.

(Inherited from Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.Gets the Type of the current instance.

(Inherited from Object)
InvalidateRequerySuggested()

CommandManagerRequerySuggested 이벤트를 발생시키도록 합니다.Forces the CommandManager to raise the RequerySuggested event.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.Creates a shallow copy of the current Object.

(Inherited from Object)
RegisterClassCommandBinding(Type, CommandBinding)

지정된 형식의 CommandBinding을 등록합니다.Registers a CommandBinding with the specified type.

RegisterClassInputBinding(Type, InputBinding)

지정된 형식의 지정된 InputBinding을 등록합니다.Registers the specified InputBinding with the specified type.

RemoveCanExecuteHandler(UIElement, CanExecuteRoutedEventHandler)

지정된 요소에서 지정된 CanExecuteRoutedEventHandler를 분리합니다.Detaches the specified CanExecuteRoutedEventHandler from the specified element.

RemoveExecutedHandler(UIElement, ExecutedRoutedEventHandler)

지정된 요소에서 지정된 ExecutedRoutedEventHandler를 분리합니다.Detaches the specified ExecutedRoutedEventHandler from the specified element.

RemovePreviewCanExecuteHandler(UIElement, CanExecuteRoutedEventHandler)

지정된 요소에서 지정된 CanExecuteRoutedEventHandler를 분리합니다.Detaches the specified CanExecuteRoutedEventHandler from the specified element.

RemovePreviewExecutedHandler(UIElement, ExecutedRoutedEventHandler)

지정된 요소에서 지정된 ExecutedRoutedEventHandler를 분리합니다.Detaches the specified ExecutedRoutedEventHandler from the specified element.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.Returns a string that represents the current object.

(Inherited from Object)

Events

RequerySuggested

CommandManager가 명령을 실행하는 기능을 변경할 수 있는 조건을 감지할 때 발생합니다.Occurs when the CommandManager detects conditions that might change the ability of a command to execute.

Attached Events

CanExecute

CanExecute(Object, IInputElement)RoutedCommand 메서드가 호출되고 PreviewCanExecute 이벤트가 처리되지 않았을 때 발생합니다.Occurs when the CanExecute(Object, IInputElement) method on the RoutedCommand is called and the PreviewCanExecute event was not handled.

Executed

Execute(Object, IInputElement)RoutedCommand 메서드가 호출되고 PreviewExecuted 이벤트가 처리되지 않았을 때 발생합니다.Occurs when the Execute(Object, IInputElement) method on the RoutedCommand is called and the PreviewExecuted event was not handled.

PreviewCanExecute

CanExecute(Object, IInputElement)RoutedCommand 메서드가 호출될 때 발생합니다.Occurs when the CanExecute(Object, IInputElement) method on the RoutedCommand is called.

PreviewExecuted

Execute(Object, IInputElement)RoutedCommand 메서드가 호출될 때 발생합니다.Occurs when the Execute(Object, IInputElement) method on the RoutedCommand is called.

Applies to

See also