Class OdfListCollection
Adds text lists to text documents. 提供清單新增入口。
public sealed class OdfListCollection : IEnumerable<OdfList>, IEnumerable
- Inheritance
-
OdfListCollection
- Implements
- Inherited Members
Constructors
OdfListCollection(TextDocument)
Initializes a new instance of the OdfListCollection class. 初始化 OdfListCollection 類別的新執行個體。
public OdfListCollection(TextDocument document)
Parameters
documentTextDocumentThe owning text document. / 所屬文字文件。
Properties
Items
Gets a summary list of the top-level lists in the document body. 取得文件本文最上層清單清單。
public IReadOnlyList<OdfList> Items { get; }
Property Value
Methods
Add()
Short overload of Add that uses default values for all optional parameters and forwards to the full overload. 便利多載:Add 的所有可選參數使用預設值並轉呼叫最長多載。
public OdfList Add()
Returns
Add(string?)
Adds a text list to the collection. 新增清單。
public OdfList Add(string? styleName)
Parameters
styleNamestringThe optional list style name. / 選用的清單樣式名稱。
Returns
- OdfList
The newly added list. / 新增完成的清單。
Clear()
Removes all top-level lists while preserving other body content. 移除所有最上層清單,並保留其他本文內容。
public void Clear()
Find(Predicate<OdfList>)
Finds the first top-level list that satisfies the predicate. 查找第一個符合條件的最上層清單。
public OdfList? Find(Predicate<OdfList> predicate)
Parameters
Returns
GetEnumerator()
Gets an enumerator over the lists, for use with LINQ queries. 取得清單列舉器,供 LINQ 查詢使用。
public IEnumerator<OdfList> GetEnumerator()
Returns
- IEnumerator<OdfList>
The list enumerator. / 清單列舉器。
Remove(OdfList)
Removes the specified top-level list. 移除指定的最上層清單。
public bool Remove(OdfList list)
Parameters
listOdfListThe list to remove. / 要移除的清單。