Table of Contents

Class MarkupCommandBase

Namespace
H.Common.Commands
Assembly
H.Common.dll
public abstract class MarkupCommandBase : MarkupExtension, ICommand, INotifyPropertyChanged
Inheritance
MarkupCommandBase
Implements
Derived
Inherited Members
Extension Methods

Properties

Target

protected IProvideValueTarget Target { get; }

Property Value

IProvideValueTarget

Methods

CanExecute(object)

Defines the method that determines whether the command can execute in its current state.

public virtual bool CanExecute(object parameter)

Parameters

parameter object

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Returns

bool

true if this command can be executed; otherwise, false.

Execute(object)

Defines the method to be called when the command is invoked.

public abstract void Execute(object parameter)

Parameters

parameter object

Data used by the command. If the command does not require data to be passed, this object can be set to null.

GetTargetElement(object)

protected UIElement GetTargetElement(object parameter)

Parameters

parameter object

Returns

UIElement

ProvideValue(IServiceProvider)

When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension.

public override object ProvideValue(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

A service provider helper that can provide services for the markup extension.

Returns

object

The object value to set on the property where the extension is applied.

RaisePropertyChanged(string)

public virtual void RaisePropertyChanged(string propertyName = "")

Parameters

propertyName string

Events

CanExecuteChanged

Occurs when changes occur that affect whether or not the command should execute.

public event EventHandler CanExecuteChanged

Event Type

EventHandler

PropertyChanged

Occurs when a property value changes.

public event PropertyChangedEventHandler PropertyChanged

Event Type

PropertyChangedEventHandler