Table of Contents

Class PresentationDocumentBuilder

Namespace
OdfKit.Presentation
Assembly
OdfKit.dll

Provides a fluent builder API for PresentationDocument. 提供 PresentationDocument 的 Fluent 建立 API。

public sealed class PresentationDocumentBuilder
Inheritance
PresentationDocumentBuilder
Inherited Members

Methods

AddChartSlide(string, string)

Short overload of AddChartSlide that accepts name and title; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 title;其餘可選參數使用預設值並轉呼叫最長 AddChartSlide 多載。

public PresentationDocumentBuilder AddChartSlide(string name, string title)

Parameters

name string
title string

Returns

PresentationDocumentBuilder

AddChartSlide(string, string, Action<OdfSlideBuilder>?)

Adds a chart-layout slide. 新增圖表版面投影片。

public PresentationDocumentBuilder AddChartSlide(string name, string title, Action<OdfSlideBuilder>? configure)

Parameters

name string

The slide name. / 投影片名稱。

title string

The title text. / 標題文字。

configure Action<OdfSlideBuilder>

The additional slide configuration delegate. / 其他投影片設定委派。

Returns

PresentationDocumentBuilder

The current builder instance. / 目前 builder 執行個體。

AddSlide(Action<OdfSlideBuilder>)

Adds a slide and configures its content. 新增投影片並設定其內容。

public PresentationDocumentBuilder AddSlide(Action<OdfSlideBuilder> configure)

Parameters

configure Action<OdfSlideBuilder>

The slide configuration delegate. / 投影片設定委派。

Returns

PresentationDocumentBuilder

The current builder instance. / 目前 builder 執行個體。

AddSlide(string, Action<OdfSlideBuilder>)

Adds a slide and configures its content. 新增投影片並設定其內容。

public PresentationDocumentBuilder AddSlide(string name, Action<OdfSlideBuilder> configure)

Parameters

name string

The slide name. / 投影片名稱。

configure Action<OdfSlideBuilder>

The slide configuration delegate. / 投影片設定委派。

Returns

PresentationDocumentBuilder

The current builder instance. / 目前 builder 執行個體。

AddTitleSlide(string, string)

Short overload of AddTitleSlide that accepts name and title; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 title;其餘可選參數使用預設值並轉呼叫最長 AddTitleSlide 多載。

public PresentationDocumentBuilder AddTitleSlide(string name, string title)

Parameters

name string
title string

Returns

PresentationDocumentBuilder

AddTitleSlide(string, string, string?)

Short overload of AddTitleSlide that accepts name, title, and subtitle; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、title 與 subtitle;其餘可選參數使用預設值並轉呼叫最長 AddTitleSlide 多載。

public PresentationDocumentBuilder AddTitleSlide(string name, string title, string? subtitle)

Parameters

name string
title string
subtitle string

Returns

PresentationDocumentBuilder

AddTitleSlide(string, string, string?, Action<OdfSlideBuilder>?)

Adds a title slide. 新增標題投影片。

public PresentationDocumentBuilder AddTitleSlide(string name, string title, string? subtitle, Action<OdfSlideBuilder>? configure)

Parameters

name string

The slide name. / 投影片名稱。

title string

The title text. / 標題文字。

subtitle string

The subtitle text. / 副標題文字。

configure Action<OdfSlideBuilder>

The additional slide configuration delegate. / 其他投影片設定委派。

Returns

PresentationDocumentBuilder

The current builder instance. / 目前 builder 執行個體。

AddTwoColumnSlide(string, string, IEnumerable<string>, IEnumerable<string>)

Short overload of AddTwoColumnSlide that accepts name, title, leftParagraphs, and rightParagraphs; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、title、leftParagraphs 與 rightParagraphs;其餘可選參數使用預設值並轉呼叫最長 AddTwoColumnSlide 多載。

public PresentationDocumentBuilder AddTwoColumnSlide(string name, string title, IEnumerable<string> leftParagraphs, IEnumerable<string> rightParagraphs)

Parameters

name string
title string
leftParagraphs IEnumerable<string>
rightParagraphs IEnumerable<string>

Returns

PresentationDocumentBuilder

AddTwoColumnSlide(string, string, IEnumerable<string>, IEnumerable<string>, Action<OdfSlideBuilder>?)

Adds a two-column content slide. 新增雙欄內容投影片。

public PresentationDocumentBuilder AddTwoColumnSlide(string name, string title, IEnumerable<string> leftParagraphs, IEnumerable<string> rightParagraphs, Action<OdfSlideBuilder>? configure)

Parameters

name string

The slide name. / 投影片名稱。

title string

The title text. / 標題文字。

leftParagraphs IEnumerable<string>

The left-column paragraphs. / 左欄段落。

rightParagraphs IEnumerable<string>

The right-column paragraphs. / 右欄段落。

configure Action<OdfSlideBuilder>

The additional slide configuration delegate. / 其他投影片設定委派。

Returns

PresentationDocumentBuilder

The current builder instance. / 目前 builder 執行個體。

Build()

Builds and returns the presentation document. 建立並傳回簡報文件。

public PresentationDocument Build()

Returns

PresentationDocument

The built presentation document. / 建立完成的簡報文件。

WithLayoutPreset(OdfLayoutPreset)

Configures the layout preset used by subsequent business presentation helpers. 設定後續商業簡報 helper 使用的版面 preset。

public PresentationDocumentBuilder WithLayoutPreset(OdfLayoutPreset preset)

Parameters

preset OdfLayoutPreset

The layout preset. / 版面 preset。

Returns

PresentationDocumentBuilder

The current builder instance. / 目前 builder 執行個體。

WithMasterPage(string)

Short overload of WithMasterPage that accepts name; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name;其餘可選參數使用預設值並轉呼叫最長 WithMasterPage 多載。

public PresentationDocumentBuilder WithMasterPage(string name)

Parameters

name string

Returns

PresentationDocumentBuilder

WithMasterPage(string, string?)

Creates the master page applied to subsequent slides by default. 建立後續投影片預設套用的母片。

public PresentationDocumentBuilder WithMasterPage(string name, string? backgroundColor)

Parameters

name string

The master page name. / 母片名稱。

backgroundColor string

The master page background color, such as #FFFFFF. / 母片背景色,例如 #FFFFFF

Returns

PresentationDocumentBuilder

The current builder instance. / 目前 builder 執行個體。

WithMetadata(Action<TextDocumentMetadataBuilder>)

Configures document metadata. 設定文件中繼資料。

public PresentationDocumentBuilder WithMetadata(Action<TextDocumentMetadataBuilder> configure)

Parameters

configure Action<TextDocumentMetadataBuilder>

The metadata configuration delegate. / 中繼資料設定委派。

Returns

PresentationDocumentBuilder

The current builder instance. / 目前 builder 執行個體。

WithStyles(OdfStyleSet)

Configures the style set used by subsequent slides and shapes. 設定後續投影片與圖形使用的樣式集合。

public PresentationDocumentBuilder WithStyles(OdfStyleSet styles)

Parameters

styles OdfStyleSet

The style set. / 樣式集合。

Returns

PresentationDocumentBuilder

The current builder instance. / 目前 builder 執行個體。

WithStyles(Action<OdfStyleSet>)

Configures the style set used by subsequent slides and shapes. 設定後續投影片與圖形使用的樣式集合。

public PresentationDocumentBuilder WithStyles(Action<OdfStyleSet> configure)

Parameters

configure Action<OdfStyleSet>

The style set configuration delegate. / 樣式集合設定委派。

Returns

PresentationDocumentBuilder

The current builder instance. / 目前 builder 執行個體。

WithTheme(OdfDesignTheme)

Configures the design theme used by subsequent slides and shapes. 設定後續投影片與圖形使用的設計主題。

public PresentationDocumentBuilder WithTheme(OdfDesignTheme theme)

Parameters

theme OdfDesignTheme

The design theme. / 設計主題。

Returns

PresentationDocumentBuilder

The current builder instance. / 目前 builder 執行個體。