ModelItemDictionary 类

更新:2007 年 11 月

实现对 ModelItem 对象的键/值字典支持。

命名空间:  Microsoft.Windows.Design.Model
程序集:  Microsoft.Windows.Design.Interaction(在 Microsoft.Windows.Design.Interaction.dll 中)

语法

声明
Public MustInherit Class ModelItemDictionary _
    Inherits ModelItem _
    Implements IDictionary(Of ModelItem, ModelItem),  _
    ICollection(Of KeyValuePair(Of ModelItem, ModelItem)), IEnumerable(Of KeyValuePair(Of ModelItem, ModelItem)),  _
    IDictionary, ICollection, IEnumerable, INotifyCollectionChanged
用法
Dim instance As ModelItemDictionary
public abstract class ModelItemDictionary : ModelItem, 
    IDictionary<ModelItem, ModelItem>, ICollection<KeyValuePair<ModelItem, ModelItem>>, 
    IEnumerable<KeyValuePair<ModelItem, ModelItem>>, IDictionary, 
    ICollection, IEnumerable, INotifyCollectionChanged
public ref class ModelItemDictionary abstract : public ModelItem, 
    IDictionary<ModelItem^, ModelItem^>, ICollection<KeyValuePair<ModelItem^, ModelItem^>>, 
    IEnumerable<KeyValuePair<ModelItem^, ModelItem^>>, IDictionary, 
    ICollection, IEnumerable, INotifyCollectionChanged
public abstract class ModelItemDictionary extends ModelItem implements IDictionary<ModelItem, ModelItem>, ICollection<KeyValuePair<ModelItem, ModelItem>>, IEnumerable<KeyValuePair<ModelItem, ModelItem>>, IDictionary, ICollection, IEnumerable, INotifyCollectionChanged

备注

ModelItemDictionary 类派生自 ModelItem,它实现对键/值对字典的支持。键和值都是项。ModelItemDictionary 定义一个附加属性键,该键将添加到字典中包含的所有项。Key 属性的数据类型是 ModelItem,它标记为不可浏览且不可序列化。除了 Key 属性,ModelItemDictionary 还从它的属性集合中返回一个 Item 属性,就像 ModelItemCollection 一样。ModelItemDictionary 重用在 ModelItemCollection 上定义的 ModelProperty。返回的值是字典中值的枚举。字典中的所有项的 Source 属性都引用此 Item 属性。

继承层次结构

System.Object
  Microsoft.Windows.Design.Model.ModelItem
    Microsoft.Windows.Design.Model.ModelItemDictionary

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

另请参见

参考

ModelItemDictionary 成员

Microsoft.Windows.Design.Model 命名空间

ModelItem

其他资源

WPF 设计器扩展性体系结构