目錄 / Table of Contents

Class OdfDrawPageCollection

Namespace
OdfKit.Drawing
Assembly
OdfKit.dll

Provides indexing, enumeration, and add entry points for drawing pages. 提供繪圖頁面的索引、列舉與新增入口。

public sealed class OdfDrawPageCollection : IReadOnlyList<OdfDrawPage>, IReadOnlyCollection<OdfDrawPage>, IEnumerable<OdfDrawPage>, IEnumerable
Inheritance
OdfDrawPageCollection
Implements
Inherited Members

Constructors

OdfDrawPageCollection(DrawingDocument)

Initializes a new instance of the OdfDrawPageCollection class. 初始化 OdfDrawPageCollection 類別的新執行個體。

public OdfDrawPageCollection(DrawingDocument document)

Parameters

document DrawingDocument

The owning drawing document. / 所屬繪圖文件。

Properties

Count

Gets the number of drawing pages. 取得繪圖頁面數量。

public int Count { get; }

Property Value

int

this[int]

Gets the drawing page at the specified index. 依索引取得繪圖頁面。

public OdfDrawPage this[int index] { get; }

Parameters

index int

The zero-based page index. / 以 0 為基準的頁面索引。

Property Value

OdfDrawPage

The specified drawing page. / 指定的繪圖頁面。

Methods

Add()

Short overload of Add that uses default values for all optional parameters and forwards to the full overload. 便利多載:Add 的所有可選參數使用預設值並轉呼叫最長多載。

public OdfDrawPage Add()

Returns

OdfDrawPage

Add(string?)

Adds a drawing page. 新增繪圖頁面。

public OdfDrawPage Add(string? name)

Parameters

name string

The optional page name. / 選用的頁面名稱。

Returns

OdfDrawPage

The newly added drawing page. / 新增完成的繪圖頁面。

Find(string)

Finds a drawing page by name. 依名稱查找繪圖頁面。

public OdfDrawPage? Find(string name)

Parameters

name string

The drawing page name. / 繪圖頁面名稱。

Returns

OdfDrawPage

The matching page, or null when no match exists. / 符合的頁面;若找不到則為 null

GetEnumerator()

Gets an enumerator for the drawing pages. 取得繪圖頁面列舉器。

public IEnumerator<OdfDrawPage> GetEnumerator()

Returns

IEnumerator<OdfDrawPage>

The drawing page enumerator. / 繪圖頁面列舉器。

Remove(OdfDrawPage)

Removes the specified drawing page from this collection. 從此集合移除指定繪圖頁面。

public bool Remove(OdfDrawPage page)

Parameters

page OdfDrawPage

The drawing page to remove. / 要移除的繪圖頁面。

Returns

bool

true if the page was removed; otherwise, false. / 若已移除頁面則為 true;否則為 false

RemoveAt(int)

Removes the drawing page at the specified index. 移除指定索引的繪圖頁面。

public void RemoveAt(int index)

Parameters

index int

The zero-based page index. / 採 0 為基準的頁面索引。