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

CommandAttribute.CanExecuteMethod Property

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.

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 CanExecuteMethod { get; set; }

Property Value

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

See Also