ColorableItems::Foreground Property
Visual Studio 2015
Sets or gets the foreground color of the item.
Assembly: EnvDTE (in EnvDTE.dll)
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
Show: