ColorableItems.Background 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置或获取项的背景色。
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
属性值
指定项颜色的单位。
- 属性
示例
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