C# Class System.Windows.Markup.CommandBindingExtension

Represents a custom markup extension, which is used to bind commands to events.
Inheritance: System.Windows.Markup.MarkupExtension
Afficher le fichier Open project: lecode-official/mvvm-framework

Private Properties

Свойство Type Description
InvokeCommandEventHandler void

Méthodes publiques

Méthode Description
CommandBindingExtension ( ) : System.Reflection

Initializes a new CommandBindingExtension instance. No command is set.

CommandBindingExtension ( PropertyPath commandPath ) : System.Reflection

Initializes a new CommandBindingExtension instance. The event arguments are not passed to the command.

CommandBindingExtension ( PropertyPath commandPath, bool passEventArgumentsToCommand ) : System.Reflection

Initializes a new CommandBindingExtension instance.

ProvideValue ( IServiceProvider serviceProvider ) : object

Provides the value of the CommandBindingExtension. It generates an event handler that is passed to the event in which theCommandBindingExtension is used.

Private Methods

Méthode Description
InvokeCommandEventHandler ( object sender, EventArgs e ) : void

The event handler, which is provided as a value for the target value of the CommandBindingExtension. It executes the provided command.

Method Details

CommandBindingExtension() public méthode

Initializes a new CommandBindingExtension instance. No command is set.
public CommandBindingExtension ( ) : System.Reflection
Résultat System.Reflection

CommandBindingExtension() public méthode

Initializes a new CommandBindingExtension instance. The event arguments are not passed to the command.
public CommandBindingExtension ( PropertyPath commandPath ) : System.Reflection
commandPath PropertyPath The command to which the event is to be bound.
Résultat System.Reflection

CommandBindingExtension() public méthode

Initializes a new CommandBindingExtension instance.
public CommandBindingExtension ( PropertyPath commandPath, bool passEventArgumentsToCommand ) : System.Reflection
commandPath PropertyPath The command to which the event is to be bound.
passEventArgumentsToCommand bool Determines whether the arguments of the event to which the command gets bound should be passed to the command as a parameter.
Résultat System.Reflection

ProvideValue() public méthode

Provides the value of the CommandBindingExtension. It generates an event handler that is passed to the event in which theCommandBindingExtension is used.
If the service provider argument is null an exception is thrown. /// An exception is raised when the target property (the event to which the command is to be bound) could not be retrieved or when the target property is no event. ///
public ProvideValue ( IServiceProvider serviceProvider ) : object
serviceProvider IServiceProvider A service provider which gives access to the target object and target value of the
Résultat object