ColorableItems.Bold 属性

定义

设置或获取该项是否应显示为粗体。

public:
 property bool Bold { bool get(); void set(bool value); };
public:
 property bool Bold { bool get(); void set(bool value); };
[System.Runtime.InteropServices.DispId(3)]
public bool Bold { [System.Runtime.InteropServices.DispId(3)] get; [System.Runtime.InteropServices.DispId(3)] set; }
[<System.Runtime.InteropServices.DispId(3)>]
[<get: System.Runtime.InteropServices.DispId(3)>]
[<set: System.Runtime.InteropServices.DispId(3)>]
member this.Bold : bool with get, set
Public Property Bold As Boolean

属性值

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  

适用于