Class TextRunFormattingBuilder
Configures text run formatting with a fluent API. 提供文字片段格式的 Fluent 設定 API。
public sealed class TextRunFormattingBuilder
- Inheritance
-
TextRunFormattingBuilder
- Inherited Members
Constructors
TextRunFormattingBuilder()
public TextRunFormattingBuilder()
Methods
BackgroundColor(string)
Sets the text background color. 設定文字背景色。
public TextRunFormattingBuilder BackgroundColor(string color)
Parameters
colorstringThe color value, formatted as
#RRGGBB. / 色彩值,格式為#RRGGBB。
Returns
- TextRunFormattingBuilder
The current builder instance. / 目前 builder 執行個體。
Bold()
Sets the text to bold. 設定文字為粗體。
public TextRunFormattingBuilder Bold()
Returns
- TextRunFormattingBuilder
The current builder instance. / 目前 builder 執行個體。
Color(string)
Sets the text color. 設定文字色彩。
public TextRunFormattingBuilder Color(string color)
Parameters
colorstringThe color value, formatted as
#RRGGBB. / 色彩值,格式為#RRGGBB。
Returns
- TextRunFormattingBuilder
The current builder instance. / 目前 builder 執行個體。
FontSize(double)
Sets the text size. 設定文字大小。
public TextRunFormattingBuilder FontSize(double points)
Parameters
pointsdoubleThe size in points. / 點數大小。
Returns
- TextRunFormattingBuilder
The current builder instance. / 目前 builder 執行個體。
Italic()
Sets the text to italic. 設定文字為斜體。
public TextRunFormattingBuilder Italic()
Returns
- TextRunFormattingBuilder
The current builder instance. / 目前 builder 執行個體。
Underline()
Sets the text to underline. 設定文字底線。
public TextRunFormattingBuilder Underline()
Returns
- TextRunFormattingBuilder
The current builder instance. / 目前 builder 執行個體。