Proprietà Command.IsAvailable
Ottiene un valore che indica se Command è correntemente attivato o meno.
Spazio dei nomi: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Sintassi
'Dichiarazione
ReadOnly Property IsAvailable As Boolean
bool IsAvailable { get; }
property bool IsAvailable {
bool get ();
}
abstract IsAvailable : bool
function get IsAvailable () : boolean
Valore proprietà
Tipo: System.Boolean
Valore booleano che indica true se il comando è correntemente attivato, false in caso contrario.
Esempi
' Macro code.
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
Sicurezza di .NET Framework
- Attendibilità totale per il chiamante immediato. Impossibile utilizzare questo membro in codice parzialmente attendibile. Per ulteriori informazioni, vedere Utilizzo di librerie da codice parzialmente attendibile.