ColorableItems.Name 属性

更新:2007 年 11 月

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

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

语法

声明
ReadOnly Default Property Name As String
用法
Dim instance As ColorableItems
Dim value As String

value = instance
string this { get; }
property String^ default {
    String^ get ();
}
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

权限

另请参见

参考

ColorableItems 接口

ColorableItems 成员

EnvDTE 命名空间

其他资源

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