Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Xaml Namespace / Command­Attribute Class / Command­Attribute Properties / Command­Attribute.​Can­Execute­Property Property

CommandAttribute.CanExecuteProperty Property

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.

Namespace:  PostSharp.Patterns.Xaml
Assembly:  PostSharp.Patterns.Xaml (in PostSharp.Patterns.Xaml.dll) Version: 5.0.38.0 (5.0.38.0)
Syntax
C#
public string CanExecuteProperty { get; set; }

Property Value

Type: 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 default CanExecuteFoo value is used, where Foo is the name of the command.

See Also