Condividi tramite


Proprietà ColorableItems.Foreground

Imposta o ottiene il colore di primo piano elemento.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

'Dichiarazione
Property Foreground As UInteger
uint Foreground { get; set; }
property unsigned int Foreground {
    unsigned int get ();
    void set (unsigned int value);
}
abstract Foreground : uint32 with get, set
function get Foreground () : uint
function set Foreground (value : uint)

Valore proprietà

Tipo: System.UInt32
Un'unità che specifica il colore dell'elemento.

Esempi

Sub ForegroundExample()
   Dim props As EnvDTE.Properties
   props = DTE.Properties("FontsAndColors", "TextEditor")
   Dim prop As EnvDTE.Property = props.Item("FontsAndColorsItems")
   Dim clritems As EnvDTE.FontsAndColorsItems = prop.Object
   Dim clritem As EnvDTE.ColorableItems = clritems.Item(1)
   Dim ClrList As String

   ClrList += "Background color: " & clritem.Background.ToString & vbCr
   ClrList += "Foreground color: " & clritem.Foreground.ToString & vbCr
   ClrList += "Bold?: " & clritem.Bold.ToString
   MsgBox(ClrList)
End Sub

Sicurezza di .NET Framework

Vedere anche

Riferimenti

ColorableItems Interfaccia

Spazio dei nomi EnvDTE