ColorableItems.Name 属性

设置或获取 ColorableItems 对象的名称。

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

语法

声明
ReadOnly Default Property Name As String
string this { get; }
property String^ default {
    String^ get ();
}
abstract Name : string
function get Name () : String

属性值

类型:System.String
一个表示 ColorableItems 对象名称的字符串。

示例

Sub ColorableItemsExample()
   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
   Dim ClrList As String
   For Each clritem In clritems
      ClrList += clritem.Name + " (" + clritem.Foreground.ToString() + ")"
      ClrList += Chr(13) & Chr(10)
   Next
   MsgBox(ClrList)
End Sub

.NET Framework 安全性

请参见

参考

ColorableItems 接口

EnvDTE 命名空间

其他资源

如何:编译和运行自动化对象模型代码示例