Xamarin.Forms Guides | Samples

Xamarin.Forms.Command.CanExecute Method

Returns a Boolean indicating if the Command can be exectued with the given parameter.

Syntax

public Boolean CanExecute (Object parameter)

Parameters

parameter
An Object used as parameter to determine if the Command can be executed.

Returns

true if the Command can be executed, false otherwise.

Remarks

If no canExecute parameter was passed to the Command constructor, this method always returns true.

If the Command was created with non-generic execute parameter, the parameter of this method is ignored.

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0