Uredi

InlineCollection Class

Definition

Represents a collection of Inline elements. InlineCollection defines the allowable child content of the Paragraph, Span, and TextBlock elements.

public ref class InlineCollection : System::Windows::Documents::TextElementCollection<System::Windows::Documents::Inline ^>, System::Collections::IList
[System.Windows.Markup.ContentWrapper(typeof(System.Windows.Documents.InlineUIContainer))]
[System.Windows.Markup.ContentWrapper(typeof(System.Windows.Documents.Run))]
[System.Windows.Markup.WhitespaceSignificantCollection]
public class InlineCollection : System.Windows.Documents.TextElementCollection<System.Windows.Documents.Inline>, System.Collections.IList
[<System.Windows.Markup.ContentWrapper(typeof(System.Windows.Documents.InlineUIContainer))>]
[<System.Windows.Markup.ContentWrapper(typeof(System.Windows.Documents.Run))>]
[<System.Windows.Markup.WhitespaceSignificantCollection>]
type InlineCollection = class
    inherit TextElementCollection<Inline>
    interface ICollection
    interface IEnumerable
    interface IList
Public Class InlineCollection
Inherits TextElementCollection(Of Inline)
Implements IList
Inheritance
InlineCollection
Attributes
Implements

Remarks

InlineCollection creation is only permitted inside an element that owns an InlineCollection, such as a TextBlock or a Paragraph. As such, an InlineCollection cannot be instantiated directly and has no default or overloaded constructor.

Properties

Name Description
Count

Gets the number of items currently in the collection.

(Inherited from TextElementCollection<TextElementType>)
FirstInline

Gets the first Inline element within this instance of InlineCollection.

IsReadOnly

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

(Inherited from TextElementCollection<TextElementType>)
LastInline

Gets the last Inline element within this instance of InlineCollection.

Methods

Name Description
Add(String)

Adds an implicit Run element with the given text, supplied as a String.

Add(TextElementType)

Appends a specified item to the collection.

(Inherited from TextElementCollection<TextElementType>)
Add(UIElement)

Adds an implicit InlineUIContainer with the supplied UIElement already in it.

AddRange(IEnumerable)

Appends a specified range of items to the collection.

(Inherited from TextElementCollection<TextElementType>)
Clear()

Clears all items from the collection.

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

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

(Inherited from TextElementCollection<TextElementType>)
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>)
GetEnumerator()

Returns an enumerator for the contents of the collection.

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

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

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

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

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

Removes a specified item from the collection.

(Inherited from TextElementCollection<TextElementType>)

Explicit Interface Implementations

Name Description
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>)
ICollection.Count

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

(Inherited from TextElementCollection<TextElementType>)
ICollection.IsSynchronized

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

(Inherited from TextElementCollection<TextElementType>)
ICollection.SyncRoot

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

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

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

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

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

(Inherited from TextElementCollection<TextElementType>)
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)

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

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

Determines the index of a specific item in the IList.

(Inherited from TextElementCollection<TextElementType>)
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.IsFixedSize

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

(Inherited from TextElementCollection<TextElementType>)
IList.IsReadOnly

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

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

Gets or sets the element at the specified index.

(Inherited from TextElementCollection<TextElementType>)
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)

Removes the IList item at the specified index.

(Inherited from TextElementCollection<TextElementType>)

Applies to

See also