Share via


ColorableItems.Foreground 属性

设置或获取项的前景色。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
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)

属性值

类型:UInt32
一个指定项的颜色的单位。

示例

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

.NET Framework 安全性

请参阅

参考

ColorableItems 接口

EnvDTE 命名空间