ListItemCollection ListItemCollection ListItemCollection ListItemCollection Class

Definition

Represents a collection of ListItem elements. ListItemCollection defines the allowable child content of a List element.

public ref class ListItemCollection : System::Windows::Documents::TextElementCollection<System::Windows::Documents::ListItem ^>
public class ListItemCollection : System.Windows.Documents.TextElementCollection<System.Windows.Documents.ListItem>
type ListItemCollection = class
    inherit TextElementCollection<ListItem>
Public Class ListItemCollection
Inherits TextElementCollection(Of ListItem)
Inheritance

Remarks

ListItemCollection creation is only permitted inside a List object. As such, a ListItemCollection cannot be instantiated directly and has no default or overloaded constructor.

Properties

Count Count Count Count

Gets the number of items currently in the collection.

(Inherited from TextElementCollection<TextElementType>)
FirstListItem FirstListItem FirstListItem FirstListItem

Gets the first ListItem element within this instance of ListItemCollection.

ICollection.Count ICollection.Count ICollection.Count ICollection.Count

Gets the number of elements contained in the ICollection. Use the type-safe Count property instead.

(Inherited from TextElementCollection<TextElementType>)
ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(Inherited from TextElementCollection<TextElementType>)
ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

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

(Inherited from TextElementCollection<TextElementType>)
IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

Gets a value indicating whether the IList has a fixed size.

(Inherited from TextElementCollection<TextElementType>)
IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly

Gets a value indicating whether the IList is read-only.

(Inherited from TextElementCollection<TextElementType>)
IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

Gets or sets the element at the specified index.

(Inherited from TextElementCollection<TextElementType>)
IsReadOnly IsReadOnly IsReadOnly IsReadOnly

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

(Inherited from TextElementCollection<TextElementType>)
LastListItem LastListItem LastListItem LastListItem

Gets the last ListItem element within this instance of ListItemCollection.

Methods

Add(TextElementType) Add(TextElementType) Add(TextElementType) Add(TextElementType)

Appends a specified item to the collection.

(Inherited from TextElementCollection<TextElementType>)
AddRange(IEnumerable) AddRange(IEnumerable) AddRange(IEnumerable) AddRange(IEnumerable)

Appends a specified range of items to the collection.

(Inherited from TextElementCollection<TextElementType>)
Clear() Clear() Clear() Clear()

Clears all items from the collection.

(Inherited from TextElementCollection<TextElementType>)
Contains(TextElementType) Contains(TextElementType) Contains(TextElementType) Contains(TextElementType)

Queries for the presence of a specified item in the collection.

(Inherited from TextElementCollection<TextElementType>)
CopyTo(TextElementType[], Int32) CopyTo(TextElementType[], Int32) CopyTo(TextElementType[], Int32) CopyTo(TextElementType[], Int32)

Copies the contents of the collection and inserts them into a specified array starting at a specified index position in the array.

(Inherited from TextElementCollection<TextElementType>)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator for the contents of the collection.

(Inherited from TextElementCollection<TextElementType>)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
InsertAfter(TextElementType, TextElementType) InsertAfter(TextElementType, TextElementType) InsertAfter(TextElementType, TextElementType) InsertAfter(TextElementType, TextElementType)

Inserts a specified item in the collection after a specified collection item.

(Inherited from TextElementCollection<TextElementType>)
InsertBefore(TextElementType, TextElementType) InsertBefore(TextElementType, TextElementType) InsertBefore(TextElementType, TextElementType) InsertBefore(TextElementType, TextElementType)

Inserts a specified item in the collection before a specified collection item.

(Inherited from TextElementCollection<TextElementType>)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(TextElementType) Remove(TextElementType) Remove(TextElementType) Remove(TextElementType)

Removes a specified item from the collection.

(Inherited from TextElementCollection<TextElementType>)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

Copies the elements of the ICollection to an Array, starting at a particular Array index. Use the type-safe CopyTo(TextElementType[], Int32) method instead.

(Inherited from TextElementCollection<TextElementType>)
IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection. Use the type-safe GetEnumerator() method instead.

(Inherited from TextElementCollection<TextElementType>)
IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

Adds an item to the IList. Use the type-safe Add(TextElementType) method instead.

(Inherited from TextElementCollection<TextElementType>)
IList.Clear() IList.Clear() IList.Clear() IList.Clear()

This type or member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. Use the type-safe Clear() method instead.

(Inherited from TextElementCollection<TextElementType>)
IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

Determines whether the IList contains a specific value. Use the type-safe Contains(TextElementType) method instead.

(Inherited from TextElementCollection<TextElementType>)
IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

Determines the index of a specific item in the IList.

(Inherited from TextElementCollection<TextElementType>)
IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

Inserts an item to the IList at the specified index. Use the type-safe InsertAfter(TextElementType, TextElementType) or InsertBefore(TextElementType, TextElementType) methods instead.

(Inherited from TextElementCollection<TextElementType>)
IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

Removes the first occurrence of a specific object from the IList. Use the type-safe Remove(TextElementType) method instead.

(Inherited from TextElementCollection<TextElementType>)
IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32)

Removes the IList item at the specified index.

(Inherited from TextElementCollection<TextElementType>)

Extension Methods

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) 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) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) 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) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) 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>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

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

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) 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) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) 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>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) 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) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) 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>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) 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>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

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

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

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

Applies to

See also