C# Класс ChocoPM.Commands.DataContextCommandBinding

A RoutedCommandBinding implementation that handles a RoutedCommand by executing methods of the DataContext of the UIElement whose UIElement.CommandBindings collection contains the DataContextCommandBinding.
Наследование: RoutedCommandBinding
Показать файл Открыть проект

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

Метод Описание
DataContextCommandBinding ( ) : System.Windows

Initializes a new instance of the DataContextCommandBinding class.

DataContextCommandBinding ( ICommand command ) : System.Windows

Initializes a new instance of the DataContextCommandBinding class by using the specified ICommand.

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

Метод Описание
OnCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void

The method that is called when the CanExecute RoutedEvent for the ICommand associated with this DataContextCommandBinding should be handled.

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

The method that is called when the Executed RoutedEvent for the ICommand associated with this DataContextCommandBinding should be handled.

OnPreviewCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void

The method that is called when the PreviewCanExecute RoutedEvent for the ICommand associated with this DataContextCommandBinding should be handled.

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

The method that is called when the PreviewExecuted RoutedEvent for the ICommand associated with this DataContextCommandBinding should be handled.

Приватные методы

Метод Описание
GetDataContext ( object element ) : object

Описание методов

DataContextCommandBinding() публичный Метод

Initializes a new instance of the DataContextCommandBinding class.
public DataContextCommandBinding ( ) : System.Windows
Результат System.Windows

DataContextCommandBinding() публичный Метод

Initializes a new instance of the DataContextCommandBinding class by using the specified ICommand.
public DataContextCommandBinding ( ICommand command ) : System.Windows
command ICommand
Результат System.Windows

OnCanExecute() защищенный Метод

The method that is called when the CanExecute RoutedEvent for the ICommand associated with this DataContextCommandBinding should be handled.
protected OnCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void
sender object The command target on which the command is executing.
e System.Windows.Input.CanExecuteRoutedEventArgs The event data.
Результат void

OnExecuted() защищенный Метод

The method that is called when the Executed RoutedEvent for the ICommand associated with this DataContextCommandBinding should be handled.
protected OnExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
sender object The command target on which the command is executing.
e System.Windows.Input.ExecutedRoutedEventArgs The event data.
Результат void

OnPreviewCanExecute() защищенный Метод

The method that is called when the PreviewCanExecute RoutedEvent for the ICommand associated with this DataContextCommandBinding should be handled.
protected OnPreviewCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void
sender object The command target on which the command is executing.
e System.Windows.Input.CanExecuteRoutedEventArgs The event data.
Результат void

OnPreviewExecuted() защищенный Метод

The method that is called when the PreviewExecuted RoutedEvent for the ICommand associated with this DataContextCommandBinding should be handled.
protected OnPreviewExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
sender object The command target on which the command is executing.
e System.Windows.Input.ExecutedRoutedEventArgs The event data.
Результат void