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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。