Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Locates a command binding for the command and asks if it is enabled.
Namespace: Microsoft.Windows.Design.Interaction
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public Function CanExecute ( _
data As GestureData _
) As Boolean
public bool CanExecute(
GestureData data
)
public:
bool CanExecute(
GestureData^ data
)
member CanExecute :
data:GestureData -> bool
public function CanExecute(
data : GestureData
) : boolean
Parameters
- data
Type: Microsoft.Windows.Design.Interaction.GestureData
The gesture data that is to be passed to the command. Gesture data is required as it provides a context object from which the CanExecute method can locate the active tool.
Return Value
Type: System.Boolean
true if the command is enabled; false if it is disabled or there is no binding for it.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | data is nulla null reference (Nothing in Visual Basic). |
| ArgumentException | data.Context is nulla null reference (Nothing in Visual Basic). |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace