ColorableItems.Bold 属性
设置或获取项是否应以粗体显示。
命名空间: EnvDTE
程序集: EnvDTE(在 EnvDTE.dll 中)
语法
声明
Property Bold As Boolean
bool Bold { get; set; }
property bool Bold {
bool get ();
void set (bool value);
}
abstract Bold : bool with get, set
function get Bold () : boolean
function set Bold (value : boolean)
属性值
类型:System.Boolean
一个布尔值,如果项为粗体,则该值为 true,否则为 false。
示例
Sub BoldExample()
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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。