InlineCollection 類別

定義

表示 Inline 項目的集合。Represents a collection of Inline elements. InlineCollection 會定義 ParagraphSpanTextBlock 項目的可允許子內容。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.Run))]
[System.Windows.Markup.ContentWrapper(typeof(System.Windows.Documents.InlineUIContainer))]
[System.Windows.Markup.WhitespaceSignificantCollection]
public class InlineCollection : System.Windows.Documents.TextElementCollection<System.Windows.Documents.Inline>, System.Collections.IList
type InlineCollection = class
    inherit TextElementCollection<Inline>
    interface IList
    interface ICollection
    interface IEnumerable
Public Class InlineCollection
Inherits TextElementCollection(Of Inline)
Implements IList
繼承
屬性
實作

備註

InlineCollection只有在擁有的InlineCollection元素內才允許建立, 例如TextBlockParagraphInlineCollection creation is only permitted inside an element that owns an InlineCollection, such as a TextBlock or a Paragraph. 因此, 無法直接InlineCollection具現化, 而且沒有預設或多載的函式。As such, an InlineCollection cannot be instantiated directly and has no default or overloaded constructor.

屬性

Count

取得目前在此集合中的項目數。Gets the number of items currently in the collection.

(繼承來源 TextElementCollection<TextElementType>)
FirstInline

取得這個 Inline 執行個體內的第一個 InlineCollection 項目。Gets the first Inline element within this instance of InlineCollection.

IsReadOnly

取得值,這個值表示集合是否為唯讀。Gets a value that indicates whether or not the collection is read-only.

(繼承來源 TextElementCollection<TextElementType>)
LastInline

取得這個 Inline 執行個體內的最後一個 InlineCollection 項目。Gets the last Inline element within this instance of InlineCollection.

方法

Add(String)

加入隱含的 Run 以及當做 String 提供的指定文字。Adds an implicit Run element with the given text, supplied as a String.

Add(TextElementType)

將指定的項目附加至集合。Appends a specified item to the collection.

(繼承來源 TextElementCollection<TextElementType>)
Add(UIElement)

加入隱含 InlineUIContainer 以及已在其中提供的 UIElementAdds an implicit InlineUIContainer with the supplied UIElement already in it.

AddRange(IEnumerable)

將指定的項目範圍附加到集合。Appends a specified range of items to the collection.

(繼承來源 TextElementCollection<TextElementType>)
Clear()

清除集合中的所有項目。Clears all items from the collection.

(繼承來源 TextElementCollection<TextElementType>)
Contains(TextElementType)

查詢集合中是否存在指定的項目。Queries for the presence of a specified item in the collection.

(繼承來源 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.

(繼承來源 TextElementCollection<TextElementType>)
Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetEnumerator()

傳回集合的內容列舉值。Returns an enumerator for the contents of the collection.

(繼承來源 TextElementCollection<TextElementType>)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
InsertAfter(TextElementType, TextElementType)

在集合的指定集合項目後面插入指定的項目。Inserts a specified item in the collection after a specified collection item.

(繼承來源 TextElementCollection<TextElementType>)
InsertBefore(TextElementType, TextElementType)

在集合的指定集合項目前面插入指定的項目。Inserts a specified item in the collection before a specified collection item.

(繼承來源 TextElementCollection<TextElementType>)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
Remove(TextElementType)

從集合中移除指定的項目。Removes a specified item from the collection.

(繼承來源 TextElementCollection<TextElementType>)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

明確介面實作

ICollection.CopyTo(Array, Int32)

從特定的 ICollection 索引開始,將 Array 的項目複製到 ArrayCopies the elements of the ICollection to an Array, starting at a particular Array index. 請改用類型安全的 CopyTo(TextElementType[], Int32) 方法。Use the type-safe CopyTo(TextElementType[], Int32) method instead.

(繼承來源 TextElementCollection<TextElementType>)
ICollection.Count

取得 ICollection 中所包含的項目數。Gets the number of elements contained in the ICollection. 請改用型別安全的 Count 屬性。Use the type-safe Count property instead.

(繼承來源 TextElementCollection<TextElementType>)
ICollection.IsSynchronized

取得值,這個值表示對 ICollection 的存取是否同步 (安全執行緒)。Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(繼承來源 TextElementCollection<TextElementType>)
ICollection.SyncRoot

取得可用以同步存取 ICollection的物件。Gets an object that can be used to synchronize access to the ICollection.

(繼承來源 TextElementCollection<TextElementType>)
IEnumerable.GetEnumerator()

傳回逐一查看集合的列舉值。Returns an enumerator that iterates through a collection. 請改用類型安全的 GetEnumerator() 方法。Use the type-safe GetEnumerator() method instead.

(繼承來源 TextElementCollection<TextElementType>)
IList.Add(Object)

將項目加入至 IListAdds an item to the IList. 請改用類型安全的 Add(TextElementType) 方法。Use the type-safe Add(TextElementType) method instead.

(繼承來源 TextElementCollection<TextElementType>)
IList.Clear()

這個類型或成員支援 Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) 基礎結構,而且不能從程式碼直接使用。This type or member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. 請改用類型安全的 Clear() 方法。Use the type-safe Clear() method instead.

(繼承來源 TextElementCollection<TextElementType>)
IList.Contains(Object)

判斷 IList 是否包含特定值。Determines whether the IList contains a specific value. 請改用類型安全的 Contains(TextElementType) 方法。Use the type-safe Contains(TextElementType) method instead.

(繼承來源 TextElementCollection<TextElementType>)
IList.IndexOf(Object)

判斷 IList 中指定項目的索引。Determines the index of a specific item in the IList.

(繼承來源 TextElementCollection<TextElementType>)
IList.Insert(Int32, Object)

將項目插入位於指定索引的 IListInserts an item to the IList at the specified index. 請改用型別安全的 InsertAfter(TextElementType, TextElementType)InsertBefore(TextElementType, TextElementType) 方法。Use the type-safe InsertAfter(TextElementType, TextElementType) or InsertBefore(TextElementType, TextElementType) methods instead.

(繼承來源 TextElementCollection<TextElementType>)
IList.IsFixedSize

取得值,指出 IList 是否有固定的大小。Gets a value indicating whether the IList has a fixed size.

(繼承來源 TextElementCollection<TextElementType>)
IList.IsReadOnly

取得值,指出 IList 是否唯讀。Gets a value indicating whether the IList is read-only.

(繼承來源 TextElementCollection<TextElementType>)
IList.Item[Int32]

在指定的索引位置上取得或設定項目。Gets or sets the element at the specified index.

(繼承來源 TextElementCollection<TextElementType>)
IList.Remove(Object)

IList 移除特定物件之第一個符合的元素。Removes the first occurrence of a specific object from the IList. 請改用類型安全的 Remove(TextElementType) 方法。Use the type-safe Remove(TextElementType) method instead.

(繼承來源 TextElementCollection<TextElementType>)
IList.RemoveAt(Int32)

移除在指定索引處的 IList 項目。Removes the IList item at the specified index.

(繼承來源 TextElementCollection<TextElementType>)

擴充方法

CopyToDataTable<T>(IEnumerable<T>)

根據輸入 DataTable 物件 (其中泛型參數 TDataRow) 傳回包含 IEnumerable<T> 物件複本的 DataRowReturns 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)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRowCopies 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)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts 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. 集合中只會包含具有相符之 XName 的項目。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. 集合中只會包含具有相符之 XName 的項目。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. 集合中只會包含具有相符之 XName 的項目。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.

適用於

另請參閱