Class DrawingDocumentBuilder
Provides a fluent creation API for DrawingDocument. 提供 DrawingDocument 的 Fluent 建立 API。
public sealed class DrawingDocumentBuilder
- Inheritance
-
DrawingDocumentBuilder
- Inherited Members
Methods
AddFlow(IEnumerable<OdfFlowStepRequest>)
Adds a default-named page containing a connected flow diagram. 新增包含已連接流程圖的預設命名頁面。
public DrawingDocumentBuilder AddFlow(IEnumerable<OdfFlowStepRequest> steps)
Parameters
stepsIEnumerable<OdfFlowStepRequest>
Returns
- DrawingDocumentBuilder
The current builder instance. / 目前 builder 執行個體。
AddFlow(IEnumerable<OdfFlowStepRequest>, OdfConnectorType)
Short overload of AddFlow that accepts steps and connectorType; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 steps 與 connectorType;其餘可選參數使用預設值並轉呼叫最長 AddFlow 多載。
public DrawingDocumentBuilder AddFlow(IEnumerable<OdfFlowStepRequest> steps, OdfConnectorType connectorType)
Parameters
stepsIEnumerable<OdfFlowStepRequest>connectorTypeOdfConnectorType
Returns
AddFlow(IEnumerable<OdfFlowStepRequest>, OdfConnectorType, OdfFlowLayoutOptions?)
Full overload of AddFlow that accepts steps, connectorType, and layoutOptions. AddFlow 完整多載:接受 steps、connectorType 與 layoutOptions。
public DrawingDocumentBuilder AddFlow(IEnumerable<OdfFlowStepRequest> steps, OdfConnectorType connectorType, OdfFlowLayoutOptions? layoutOptions)
Parameters
stepsIEnumerable<OdfFlowStepRequest>connectorTypeOdfConnectorTypelayoutOptionsOdfFlowLayoutOptions
Returns
AddFlow(string, IEnumerable<OdfFlowStepRequest>)
Adds a page containing a connected flow diagram. 新增包含已連接流程圖的頁面。
public DrawingDocumentBuilder AddFlow(string pageName, IEnumerable<OdfFlowStepRequest> steps)
Parameters
pageNamestringstepsIEnumerable<OdfFlowStepRequest>
Returns
- DrawingDocumentBuilder
The current builder instance. / 目前 builder 執行個體。
AddFlow(string, IEnumerable<OdfFlowStepRequest>, OdfConnectorType)
Short overload of AddFlow that accepts pageName, steps, and connectorType; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 pageName、steps 與 connectorType;其餘可選參數使用預設值並轉呼叫最長 AddFlow 多載。
public DrawingDocumentBuilder AddFlow(string pageName, IEnumerable<OdfFlowStepRequest> steps, OdfConnectorType connectorType)
Parameters
pageNamestringstepsIEnumerable<OdfFlowStepRequest>connectorTypeOdfConnectorType
Returns
AddFlow(string, IEnumerable<OdfFlowStepRequest>, OdfConnectorType, OdfFlowLayoutOptions?)
Full overload of AddFlow that accepts pageName, steps, connectorType, and layoutOptions. AddFlow 完整多載:接受 pageName、steps、connectorType 與 layoutOptions。
public DrawingDocumentBuilder AddFlow(string pageName, IEnumerable<OdfFlowStepRequest> steps, OdfConnectorType connectorType, OdfFlowLayoutOptions? layoutOptions)
Parameters
pageNamestringstepsIEnumerable<OdfFlowStepRequest>connectorTypeOdfConnectorTypelayoutOptionsOdfFlowLayoutOptions
Returns
AddPage(Action<OdfDrawPageBuilder>)
Adds a drawing page and configures its content. 新增繪圖頁面並設定其內容。
public DrawingDocumentBuilder AddPage(Action<OdfDrawPageBuilder> configure)
Parameters
configureAction<OdfDrawPageBuilder>The page configuration delegate. / 頁面設定委派。
Returns
- DrawingDocumentBuilder
The current builder instance. / 目前 builder 執行個體。
AddPage(string, Action<OdfDrawPageBuilder>)
Adds a drawing page and configures its content. 新增繪圖頁面並設定其內容。
public DrawingDocumentBuilder AddPage(string name, Action<OdfDrawPageBuilder> configure)
Parameters
namestringThe page name. / 頁面名稱。
configureAction<OdfDrawPageBuilder>The page configuration delegate. / 頁面設定委派。
Returns
- DrawingDocumentBuilder
The current builder instance. / 目前 builder 執行個體。
Build()
Builds and returns the drawing document. 建立並傳回繪圖文件。
public DrawingDocument Build()
Returns
- DrawingDocument
The built drawing document. / 建立完成的繪圖文件。
WithLayoutPreset(OdfLayoutPreset)
Sets the layout preset used by subsequent drawing helpers. 設定後續繪圖 helper 使用的版面 preset。
public DrawingDocumentBuilder WithLayoutPreset(OdfLayoutPreset preset)
Parameters
presetOdfLayoutPresetThe layout preset. / 版面 preset。
Returns
- DrawingDocumentBuilder
The current builder instance. / 目前 builder 執行個體。
WithMetadata(Action<TextDocumentMetadataBuilder>)
Configures the document metadata. 設定文件中繼資料。
public DrawingDocumentBuilder WithMetadata(Action<TextDocumentMetadataBuilder> configure)
Parameters
configureAction<TextDocumentMetadataBuilder>The metadata configuration delegate. / 中繼資料設定委派。
Returns
- DrawingDocumentBuilder
The current builder instance. / 目前 builder 執行個體。
WithStyles(OdfStyleSet)
Sets the style set used by subsequent drawing pages and shapes. 設定後續繪圖頁面與圖形使用的樣式集合。
public DrawingDocumentBuilder WithStyles(OdfStyleSet styles)
Parameters
stylesOdfStyleSetThe style set. / 樣式集合。
Returns
- DrawingDocumentBuilder
The current builder instance. / 目前 builder 執行個體。
WithStyles(Action<OdfStyleSet>)
Sets the style set used by subsequent drawing pages and shapes. 設定後續繪圖頁面與圖形使用的樣式集合。
public DrawingDocumentBuilder WithStyles(Action<OdfStyleSet> configure)
Parameters
configureAction<OdfStyleSet>The style set configuration delegate. / 樣式集合設定委派。
Returns
- DrawingDocumentBuilder
The current builder instance. / 目前 builder 執行個體。
WithTheme(OdfDesignTheme)
Sets the design theme used by subsequent drawing pages and shapes. 設定後續繪圖頁面與圖形使用的設計主題。
public DrawingDocumentBuilder WithTheme(OdfDesignTheme theme)
Parameters
themeOdfDesignThemeThe design theme. / 設計主題。
Returns
- DrawingDocumentBuilder
The current builder instance. / 目前 builder 執行個體。