Compartilhar via


ColorableItems.Foreground Property

Definition

Sets or gets the foreground color of the item.

public:
 property System::UInt32 Foreground { System::UInt32 get(); void set(System::UInt32 value); };
public:
 property unsigned int Foreground { unsigned int get(); void set(unsigned int value); };
[System.Runtime.InteropServices.ComAliasName("stdole.OLE_COLOR")]
[System.Runtime.InteropServices.DispId(1)]
public uint Foreground { [System.Runtime.InteropServices.DispId(1)] get; [System.Runtime.InteropServices.DispId(1)] set; }
[<System.Runtime.InteropServices.ComAliasName("stdole.OLE_COLOR")>]
[<System.Runtime.InteropServices.DispId(1)>]
[<get: System.Runtime.InteropServices.DispId(1)>]
[<set: System.Runtime.InteropServices.DispId(1)>]
member this.Foreground : uint32 with get, set
Public Property Foreground As UInteger

Property Value

A unit specifying the color of the item.

Attributes

Examples

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  

Applies to