C# Класс WPF.JoshSmith.Input.SmartRoutedCommand

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.
Documentation: http://www.codeproject.com/KB/WPF/SmartRoutedCommandsInWPF.aspx
Наследование: System.Windows.Input.RoutedCommand
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
IsCommandSinkProperty System.Windows.DependencyProperty

Открытые методы

Метод Описание
GetIsCommandSink ( DependencyObject obj ) : bool

Gets the value of the attached IsCommandSink property for the specified object.

SetIsCommandSink ( DependencyObject obj, bool value ) : void

Sets the value of the attached IsCommandSink property for the specified object.

Защищенные методы

Метод Описание
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
OnExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
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() публичный статический Метод

Gets the value of the attached IsCommandSink property for the specified object.
public static GetIsCommandSink ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject
Результат bool

SetIsCommandSink() публичный статический Метод

Sets the value of the attached IsCommandSink property for the specified object.
public static SetIsCommandSink ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject
value bool
Результат void

Описание свойств

IsCommandSinkProperty публичное статическое свойство

Represents the IsCommandSink attached property. This field is readonly.
public static DependencyProperty,System.Windows IsCommandSinkProperty
Результат System.Windows.DependencyProperty