更新:2007 年 11 月
设置或获取项的背景色。
命名空间: EnvDTE
程序集: EnvDTE(在 EnvDTE.dll 中)
语法
声明
Property Background As UInteger
用法
Dim instance As ColorableItems
Dim value As UInteger
value = instance.Background
instance.Background = value
uint Background { get; set; }
property unsigned int Background {
unsigned int get ();
void set (unsigned int value);
}
function get Background () : uint
function set Background (value : uint)
属性值
一个指定项的颜色的单位。
示例
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
权限
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。