ModelItemCollection Class

Definition

Represents a collection of model items that can be individually accessed by index.

public ref class ModelItemCollection abstract : System::Activities::Presentation::Model::ModelItem, System::Collections::Generic::ICollection<System::Activities::Presentation::Model::ModelItem ^>, System::Collections::Generic::IEnumerable<System::Activities::Presentation::Model::ModelItem ^>, System::Collections::Generic::IList<System::Activities::Presentation::Model::ModelItem ^>, System::Collections::IList, System::Collections::Specialized::INotifyCollectionChanged
public abstract class ModelItemCollection : System.Activities.Presentation.Model.ModelItem, System.Collections.Generic.ICollection<System.Activities.Presentation.Model.ModelItem>, System.Collections.Generic.IEnumerable<System.Activities.Presentation.Model.ModelItem>, System.Collections.Generic.IList<System.Activities.Presentation.Model.ModelItem>, System.Collections.IList, System.Collections.Specialized.INotifyCollectionChanged
type ModelItemCollection = class
    inherit ModelItem
    interface IList<ModelItem>
    interface ICollection<ModelItem>
    interface seq<ModelItem>
    interface IEnumerable
    interface IList
    interface ICollection
    interface INotifyCollectionChanged
Public MustInherit Class ModelItemCollection
Inherits ModelItem
Implements ICollection(Of ModelItem), IEnumerable(Of ModelItem), IList, IList(Of ModelItem), INotifyCollectionChanged
Inheritance
ModelItemCollection
Implements

Remarks

If changes are made to the item collection during an editing scope, such as within a drag and drop operation, the Count property will not be updated until the editing scope completes.

Constructors

ModelItemCollection()

Creates a new instance of ModelItemCollection.

Fields

ItemProperty

Identifies the Item dependency property.

Properties

Attributes

Gets the attributes declared on this item.

(Inherited from ModelItem)
Content

Gets the ContentPropertyAttribute of the item, or null.

(Inherited from ModelItem)
Count

Returns the count of items in the collection.

IsFixedSize

Gets a value that indicates whether the collection has a fixed size.

IsReadOnly

Gets a value that indicates whether the collection is read-only.

IsSynchronized

Gets a value that indicates whether access to the collection is synchronized (thread safe).

Item[Int32]

Gets or sets the item at the given index in the collection.

ItemType

Gets the type of object that the item represents.

(Inherited from ModelItem)
Name

Gets or sets the name or ID of the item.

(Inherited from ModelItem)
Parent

Gets the item that is the parent of this item.

(Inherited from ModelItem)
Parents

Gets all parents of this item.

(Inherited from ModelItem)
Properties

Gets the public properties on this item.

(Inherited from ModelItem)
Root

Gets the item that is the root of this tree.

(Inherited from ModelItem)
Source

Gets the property that provided this value.

(Inherited from ModelItem)
Sources

Gets all the properties that hold this value.

(Inherited from ModelItem)
SyncRoot

Gets an object that can be used to synchronize access to the collection.

View

Gets a DependencyObject that graphically represents this item.

(Inherited from ModelItem)

Methods

Add(ModelItem)

Adds a model item to the end of the ModelItemCollection.

Add(Object)

Adds a model item to the end of the ModelItemCollection.

BeginEdit()

Opens an editing scope for the designer. After an editing scope is open, all changes across all objects will be saved into the scope until the transaction is completed or reverted. Editing scopes can be nested, but must be committed in order.

(Inherited from ModelItem)
BeginEdit(Boolean)

Opens an editing scope for the designer.

(Inherited from ModelItem)
BeginEdit(String)

Opens an editing scope for the designer. After an editing scope is open, all changes across all objects will be saved into the scope until the transaction is completed or reverted. Editing scopes can be nested, but must be committed in order.

(Inherited from ModelItem)
BeginEdit(String, Boolean)

Opens an editing scope for the designer.

(Inherited from ModelItem)
Clear()

Removes all elements from the ModelItemCollection.

Contains(ModelItem)

Determines whether the ModelItemCollection contains the specified element.

Contains(Object)

Determines whether the ModelItemCollection contains the specified element.

CopyTo(ModelItem[], Int32)

Copies the contents of the collection into the given array.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetCurrentValue()

Returns the current value of the underlying model object that the ModelItem is wrapping.

(Inherited from ModelItem)
GetEnumerator()

Gets an enumerator that iterates through the ModelItemCollection.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
IndexOf(ModelItem)

Returns the zero-based index of the first occurrence of a value in the ModelItemCollection.

Insert(Int32, ModelItem)

Inserts an element into the ModelItemCollection at the specified index.

Insert(Int32, Object)

Inserts an element into the ModelItemCollection at the specified index.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Move(Int32, Int32)

Moves an item in the collection to a different index.

Remove(ModelItem)

Removes the ModelItem from the collection.

Remove(Object)

Removes the value from the collection.

RemoveAt(Int32)

Removes the item at the given index.

ToString()

Returns a string representation of the underlying model object contained in this model item.

(Inherited from ModelItem)

Events

CollectionChanged

Occurs when the collection changes.

PropertyChanged

Implements INotifyPropertyChanged. Use this event to listen for changes to the model. This is also used by the data binding features of WPF.

(Inherited from ModelItem)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

ICollection.Count

Gets the number of elements contained in the collection.

ICollection.IsSynchronized

The number of elements contained in the ICollection is synchronized (thread safe).

ICollection.SyncRoot

Gets an object that can be used to synchronize access to the ICollection.

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IList.Add(Object)

Adds a model item to the end of the ModelItemCollection.

IList.Clear()

Removes all items from the IList.

IList.Contains(Object)

Determines whether the ModelItemCollection contains the specified element.

IList.IndexOf(Object)

Determines the index of a specific item in the IList.

IList.Insert(Int32, Object)

Inserts an element into the ModelItemCollection at the specified index.

IList.IsFixedSize

Gets a value that indicates whether the IList has a fixed size.

IList.IsReadOnly

Gets a value that indicates whether the IList is read-only.

IList.Item[Int32]

Gets or sets the element at the specified index.

IList.Remove(Object)

Removes the first occurrence of a specific object from the IList.

IList.RemoveAt(Int32)

Removes the IList item at the specified index.

Extension Methods

Focus(ModelItem)

Sets the keyboard focus on the specified designer item.

Focus(ModelItem, Int32)

Sets the keyboard focus on the specified designer item.

GetEditingContext(ModelItem)

Retrieves the editing context of the specified model item.

GetModelPath(ModelItem)

Retrieves the path of the specified model item.

IsParentOf(ModelItem, ModelItem)

Returns a value that indicates whether the first specified designer item is a parent of the second specified designer item.

CopyToDataTable<T>(IEnumerable<T>)

Returns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

Returns a filtered collection of elements that contains the ancestors of every node in the source collection. Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

Returns a filtered collection of the child elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

Removes every node in the source collection from its parent node.

Applies to