C# 클래스 Zetbox.Client.WPF.Commands.SmartRoutedUICommand

This abstract class is a RoutedCommand which allows its subclasses to provide default logic for determining if they can execute and how to execute. To enable the default logic to be used, set the IsCommandSink attached property to true on the root element of the element tree which uses one or more SmartRoutedCommand subclasses.
상속: System.Windows.Input.RoutedUICommand
파일 보기 프로젝트 열기: daszat/zetbox 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
IsCommandSinkProperty System.Windows.DependencyProperty

공개 메소드들

메소드 설명
GetIsCommandSink ( DependencyObject obj ) : bool

Returns a value indicating whether or not the specified DependencyObject is a command sink or not.

SetIsCommandSink ( DependencyObject obj, bool value ) : void

Sets the value indicating whether or not the specified DependencyObject is a command sink or not.

SmartRoutedUICommand ( string text, Type ownerType ) : System

Initializes a new instance of the SmartRoutedUICommand class, specifying a label and an owner class.

보호된 메소드들

메소드 설명
CanExecuteCore ( object parameter ) : bool

Child classes override this method to provide logic which determines if the command can execute. This method will only be invoked if no element in the tree indicated that it can execute the command.

ExecuteCore ( object parameter ) : void

Child classes override this method to provide default execution logic. This method will only be invoked if CanExecuteCore returns true.

비공개 메소드들

메소드 설명
OnCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void

Event handler, called when CanExecute changes.

OnExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

Event handler, called when Executed changes.

OnIsCommandSinkChanged ( DependencyObject depObj, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Invoked when the IsCommandSink attached property is set on an element.

메소드 상세

CanExecuteCore() 보호된 추상적인 메소드

Child classes override this method to provide logic which determines if the command can execute. This method will only be invoked if no element in the tree indicated that it can execute the command.
protected abstract CanExecuteCore ( object parameter ) : bool
parameter object The command parameter (optional).
리턴 bool

ExecuteCore() 보호된 추상적인 메소드

Child classes override this method to provide default execution logic. This method will only be invoked if CanExecuteCore returns true.
protected abstract ExecuteCore ( object parameter ) : void
parameter object The command parameter (optional).
리턴 void

GetIsCommandSink() 공개 정적인 메소드

Returns a value indicating whether or not the specified DependencyObject is a command sink or not.
public static GetIsCommandSink ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject the object to check
리턴 bool

SetIsCommandSink() 공개 정적인 메소드

Sets the value indicating whether or not the specified DependencyObject is a command sink or not.
if is null
public static SetIsCommandSink ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject the object to modify
value bool true if the passed object is a command sink, false otherwise
리턴 void

SmartRoutedUICommand() 공개 메소드

Initializes a new instance of the SmartRoutedUICommand class, specifying a label and an owner class.
public SmartRoutedUICommand ( string text, Type ownerType ) : System
text string the label to use
ownerType System.Type the owner class to use
리턴 System

프로퍼티 상세

IsCommandSinkProperty 공개적으로 정적으로 프로퍼티

Represents the IsCommandSink attached property. This is readonly.
public static DependencyProperty,System.Windows IsCommandSinkProperty
리턴 System.Windows.DependencyProperty