ModelItemDictionary Class
Implements key/value dictionary support for ModelItem objects.
Inheritance Hierarchy
System.Object
Microsoft.Windows.Design.Model.ModelItem
Microsoft.Windows.Design.Model.ModelItemDictionary
Namespace: Microsoft.Windows.Design.Model
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
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
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
[<AbstractClass>]
type ModelItemDictionary =
class
inherit ModelItem
interface IDictionary<ModelItem, ModelItem>
interface ICollection<KeyValuePair<ModelItem, ModelItem>>
interface IEnumerable<KeyValuePair<ModelItem, ModelItem>>
interface IDictionary
interface ICollection
interface IEnumerable
interface INotifyCollectionChanged
end
public abstract class ModelItemDictionary extends ModelItem implements IDictionary<ModelItem, ModelItem>, ICollection<KeyValuePair<ModelItem, ModelItem>>, IEnumerable<KeyValuePair<ModelItem, ModelItem>>, IDictionary, ICollection, IEnumerable, INotifyCollectionChanged
The ModelItemDictionary type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ModelItemDictionary | Initializes a new instance of the ModelItemDictionary class. |
Top
Properties
Name | Description | |
---|---|---|
Content | When overridden in a derived class, gets a ModelProperty representing the item's ContentPropertyAttribute. (Inherited from ModelItem.) | |
Context | Gets an object that contains contextual information about the designer this ModelItem was created for. (Inherited from ModelItem.) | |
Count | When overridden in a derived class, gets the count of items in the dictionary. | |
Events | When overridden in a derived class, gets the public events on this object. (Inherited from ModelItem.) | |
IsFixedSize | When overridden in a derived class, gets a value indicating whether the dictionary is a fixed size. | |
IsReadOnly | When overridden in a derived class, gets a value indicating whether the dictionary can be modified. | |
IsSynchronized | When overridden in a derived class, gets a value indicating whether the dictionary is synchronized. | |
Item[Object] | When overridden in a derived class, gets or sets the item at the specified key. | |
Item[ModelItem] | When overridden in a derived class, gets or sets the item at the specified key. | |
ItemType | When overridden in a derived class, gets the type of object the item represents. (Inherited from ModelItem.) | |
Keys | When overridden in a derived class, gets the keys of the dictionary. | |
Name | When overridden in a derived class, gets or sets the name or ID of the item. (Inherited from ModelItem.) | |
Parent | When overridden in a derived class, gets the item that is the parent of this item. (Inherited from ModelItem.) | |
Properties | When overridden in a derived class, gets the public properties on this object. (Inherited from ModelItem.) | |
Root | When overridden in a derived class, gets the item that is the root of this tree. (Inherited from ModelItem.) | |
Source | When overridden in a derived class, gets the property that provided this value. (Inherited from ModelItem.) | |
SyncRoot | When overridden in a derived class, gets the object used to synchronize this dictionary. | |
Values | When overridden in a derived class, gets the values of the dictionary. | |
View | When overridden in a derived class, gets the visual or visual3D representing the UI for this item. (Inherited from ModelItem.) |
Top
Methods
Name | Description | |
---|---|---|
Add(Object, Object) | When overridden in a derived class, adds the value to the dictionary under the specified key. | |
Add(ModelItem, ModelItem) | When overridden in a derived class, adds the item to the dictionary under the specified key. | |
BeginEdit() | When overridden in a derived class, this method is called when performing multiple operations on an object or group of objects. (Inherited from ModelItem.) | |
BeginEdit(String) | When overridden in a derived class, this method is called when performing multiple operations on an object or group of objects. (Inherited from ModelItem.) | |
Clear | When overridden in a derived class, clears the contents of the dictionary. | |
Contains | When overridden in a derived class, returns whether the dictionary contains the specified key value pair. | |
ContainsKey(Object) | When overridden in a derived class, returns a value indicating whether the dictionary contains the specified key. | |
ContainsKey(ModelItem) | When overridden in a derived class, returns a value indicating whether the dictionary contains the specified key. | |
CopyTo | When overridden in a derived class, copies the contents of the dictionary into the specified array beginning at the specified index. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAttributes(Type) | Gets the attributes of the requested type that are declared on this item. (Inherited from ModelItem.) | |
GetAttributes(TypeIdentifier) | Gets the attributes of the requested type that are declared on this item. (Inherited from ModelItem.) | |
GetCurrentValue | When overridden in a derived class, returns the current value of the underlying model object the ModelItem is wrapping. (Inherited from ModelItem.) | |
GetEnumerator | When overridden in a derived class, returns an enumerator for the items in the dictionary. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsItemOfType(Type) | Gets a value that indicates whether this item is of the specified type or implements the specified interface. (Inherited from ModelItem.) | |
IsItemOfType(TypeIdentifier) | Gets a value that indicates whether this item is of the specified type or implements the specified interface. (Inherited from ModelItem.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Remove(Object) | When overridden in a derived class, removes the item from the dictionary. | |
Remove(ModelItem) | When overridden in a derived class, removes the item from the dictionary. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TryGetValue(Object, ModelItem%) | When overridden in a derived class, retrieves the value for the specified key. | |
TryGetValue(ModelItem, ModelItem%) | When overridden in a derived class, retrieves the value for the specified key. |
Top
Events
Name | Description | |
---|---|---|
CollectionChanged | When overridden in a derived class, occurs when the contents of this dictionary is changed. | |
PropertyChanged | When overridden in a derived class, occurs when a property on the model changes. (Inherited from ModelItem.) |
Top
Fields
Name | Description | |
---|---|---|
KeyProperty | ModelItemDictionary provides an attached property "Key", which is adds to all items contained in the dictionary. The data type of the Key property is "ModelItem". |
Top
Explicit Interface Implementations
Top
Remarks
The ModelItemDictionary class derives from ModelItem and implements support for a dictionary of key/value pairs. Both the keys and values are items. ModelItemDictionary defines an attached property Key, which is adds to all items contained in the dictionary. The data type of the Key property is ModelItem and it is marked as non-browsable and non-serializable. In addition to the Key property, ModelItemDictionary also returns an Item property from its properties collection just like ModelItemCollection. ModelItemDictionary reuses the ModelProperty defined on ModelItemCollection. The value returned is an enumeration of the values in the dictionary. The Source property of all items in the dictionary refers to this Item property.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.Windows.Design.Model Namespace