PostSharpAPI ReferencePost­Sharp.​Patterns.​XamlCommand­AttributeCan­Execute­Method
Open sandboxFocus

CommandAttribute.CanExecuteMethod Property

CanExecuteMethod

Gets or sets the name of the method that is called to determine whether the command can be executed. This method corresponds to the CanExecute(Object) method.

Declaration
public string CanExecuteMethod { get; set; }
Property Value
Type Description
System.String
Remarks

The CanExecute method must be declared in the same class as the command property, return a bool value and can have zero or one parameter.

If this property is not set, then the aspect will look for a method named CanFoo or CanExecuteFoo, where Foo is the name of the command without the Command suffix.