Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Gets a value indicating whether or not the Command is currently enabled.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
ReadOnly Property IsAvailable As Boolean
bool IsAvailable { get; }
property bool IsAvailable {
bool get ();
}
abstract IsAvailable : bool with get
function get IsAvailable () : boolean
Property Value
Type: System.Boolean
A Boolean value indicating true if the command is currently enabled; otherwise, false.
Examples
Sub IsAvailableExample()
' Before running, you must add a reference to
' Microsoft.VisualStudio.CommandBars.
Dim cmds As Commands
Dim cmdobj As Command
Dim customin, customout As Object
Dim colAddins As AddIns
' Set references.
colAddins = DTE.AddIns()
cmds = DTE.Commands
cmdobj = cmds.Item("File.NewFile")
' List some of the command properties.
MsgBox("Command Name: " & cmdobj.Name)
MsgBox("Is Command Available?: " & cmdobj.IsAvailable)
MsgBox("Command ID: " & cmdobj.ID)
MsgBox("Command GUID: " & cmdobj.Guid)
End Sub
.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.