Freigeben über


ColorableItems.Background Property

Definition

Sets or gets the background color of the item.

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

Property Value

A unit specifying the color of the item.

Attributes

Examples

Sub BackgroundExample()  
   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