共用方式為


IEditorFormatMap.SetProperties 方法

設定索引鍵的 ResourceDictionary

命名空間:  Microsoft.VisualStudio.Text.Classification
組件:  Microsoft.VisualStudio.Text.UI.Wpf (在 Microsoft.VisualStudio.Text.UI.Wpf.dll 中)

語法

'宣告
Sub SetProperties ( _
    key As String, _
    properties As ResourceDictionary _
)
void SetProperties(
    string key,
    ResourceDictionary properties
)
void SetProperties(
    String^ key, 
    ResourceDictionary^ properties
)
abstract SetProperties : 
        key:string * 
        properties:ResourceDictionary -> unit
function SetProperties(
    key : String, 
    properties : ResourceDictionary
)

參數

  • key
    類型:String

    索引鍵。

備註

設定文字屬性,會導致引發 FormatMappingChanged 事件。

如果ResourceDictionary集合不包含應有的屬性,則內容的取用者可能會擲回例外狀況。

.NET Framework 安全性

請參閱

參考

IEditorFormatMap 介面

Microsoft.VisualStudio.Text.Classification 命名空間