Command.IsAvailable Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft einen Wert ab, der angibt, ob Command gerade aktiviert ist oder nicht.
public:
property bool IsAvailable { bool get(); };
public:
property bool IsAvailable { bool get(); };
[System.Runtime.InteropServices.DispId(6)]
public bool IsAvailable { [System.Runtime.InteropServices.DispId(6)] get; }
[<System.Runtime.InteropServices.DispId(6)>]
[<get: System.Runtime.InteropServices.DispId(6)>]
member this.IsAvailable : bool
Public ReadOnly Property IsAvailable As Boolean
Eigenschaftswert
Ein boolescher Wert, der true ist, wenn der Befehl gerade aktiviert ist, und andernfalls false.
- Attribute
Beispiele
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