目錄 / Table of Contents

Class OdfSlideCollection

Namespace
OdfKit.Presentation
Assembly
OdfKit.dll

Provides indexing, enumeration, and creation entry points for presentation slides. 提供簡報投影片的索引、列舉與新增入口。

public sealed class OdfSlideCollection : IReadOnlyList<OdfSlide>, IReadOnlyCollection<OdfSlide>, IEnumerable<OdfSlide>, IEnumerable
Inheritance
OdfSlideCollection
Implements
Inherited Members

Constructors

OdfSlideCollection(PresentationDocument)

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

public OdfSlideCollection(PresentationDocument document)

Parameters

document PresentationDocument

The owning presentation document. / 所屬簡報文件。

Properties

Count

Gets the slide count. 取得投影片數量。

public int Count { get; }

Property Value

int

this[int]

Gets a slide by index. 依索引取得投影片。

public OdfSlide this[int index] { get; }

Parameters

index int

The zero-based slide index. / 採 0 為基準的投影片索引。

Property Value

OdfSlide

The specified slide. / 指定投影片。

Methods

Add()

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

public OdfSlide Add()

Returns

OdfSlide

Add(string?)

Adds a slide. 新增投影片。

public OdfSlide Add(string? name)

Parameters

name string

The optional slide name. / 選用的投影片名稱。

Returns

OdfSlide

The added slide. / 新增完成的投影片。

Find(string)

Finds a slide by name. 依名稱查找投影片。

public OdfSlide? Find(string name)

Parameters

name string

The slide name. / 投影片名稱。

Returns

OdfSlide

The matching slide, or null when no match exists. / 符合的投影片;若找不到則為 null

GetEnumerator()

Gets the slide enumerator. 取得投影片列舉器。

public IEnumerator<OdfSlide> GetEnumerator()

Returns

IEnumerator<OdfSlide>

The slide enumerator. / 投影片列舉器。

Remove(OdfSlide)

Removes the specified slide from this collection. 從此集合移除指定投影片。

public bool Remove(OdfSlide slide)

Parameters

slide OdfSlide

The slide to remove. / 要移除的投影片。

Returns

bool

true if the slide was removed; otherwise, false. / 若已移除投影片則為 true;否則為 false

RemoveAt(int)

Removes the slide at the specified index. 移除指定索引的投影片。

public void RemoveAt(int index)

Parameters

index int

The zero-based slide index. / 採 0 為基準的投影片索引。