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

A markup extension that returns an ICommand that is capable of executing methods of the DataContext of a target FrameworkElement.
When the ICommand.Execute and ICommand.CanExecute methods of the returned ICommand object are invoked, methods on the DataContext whose names correspond to the values of the Executed and CanExecute properties are invoked. See the Executed and CanExecute properties for specifics on the allowable method signatures.
Наследование: System.Windows.Markup.MarkupExtension, ICommand
Показать файл Открыть проект

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

Метод Описание
DataContextCommandAdapter ( ) : System

Initializes a new instance of the DataContextCommandAdapter class.

DataContextCommandAdapter ( string executed ) : System

Initializes a new instance of the DataContextCommandAdapter class by using the specified method name for the Executed property.

DataContextCommandAdapter ( string executed, string canExecute ) : System

Initializes a new instance of the DataContextCommandAdapter class by using the specified method names for the Executed and CanExecute properties.

ProvideValue ( IServiceProvider serviceProvider ) : object

Returns an ICommand that is capable of executing methods of the DataContext of the target.

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

Метод Описание
GetDataContext ( object element ) : object
GetInputBindingsCollectionOwner ( IProvideValueTarget targetService ) : object
ICommand ( object parameter ) : bool
ICommand ( object parameter ) : void

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

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

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

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

Initializes a new instance of the DataContextCommandAdapter class by using the specified method name for the Executed property.
public DataContextCommandAdapter ( string executed ) : System
executed string /// The name of the method. ///
Результат System

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

Initializes a new instance of the DataContextCommandAdapter class by using the specified method names for the Executed and CanExecute properties.
public DataContextCommandAdapter ( string executed, string canExecute ) : System
executed string /// The name of the method. ///
canExecute string /// The name of the method. ///
Результат System

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

Returns an ICommand that is capable of executing methods of the DataContext of the target.
public ProvideValue ( IServiceProvider serviceProvider ) : object
serviceProvider IServiceProvider /// Object that can provide services for the markup extension. ///
Результат object