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

CommandAttribute.CanExecuteProperty Property

CanExecuteProperty

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

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

The CanExecute property must be declared in the same class as the command property and return a bool value.

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