OfficeIMO

API Reference

Class

TextBuilder

Namespace OfficeIMO.Word.Fluent
Assembly OfficeIMO.Word

Provides helpers for styling text fragments.

Inheritance

  • Object
  • TextBuilder

Methods

public TextBuilder BoldOn() #
Returns: TextBuilder

Applies bold formatting to the current run.

public TextBuilder CapsStyle(CapsStyle capsStyle) #
Returns: TextBuilder

Applies capitalization style to the current run.

Parameters

capsStyle OfficeIMO.Word.CapsStyle requiredposition: 0
Capitalization style.
public TextBuilder Color(String hex) #
Returns: TextBuilder

Sets the text color using a hexadecimal value.

Parameters

hex System.String requiredposition: 0
Color in hexadecimal format.
public TextBuilder DoubleStrike(Boolean isDoubleStrike = true) #
Returns: TextBuilder

Applies double strikethrough formatting to the current run.

Parameters

isDoubleStrike System.Boolean = true optionalposition: 0
Whether to apply double strikethrough.
public TextBuilder Emboss() #
Returns: TextBuilder

Applies emboss formatting to the current run.

public TextBuilder FontFamily(String fontFamily) #
Returns: TextBuilder

Sets the font family for the current run.

Parameters

fontFamily System.String requiredposition: 0
Font family name.
public TextBuilder FontSize(Int32 fontSize) #
Returns: TextBuilder

Sets the font size for the current run.

Parameters

fontSize System.Int32 requiredposition: 0
Font size in points.
public TextBuilder Highlight(HighlightColorValues highlight) #
Returns: TextBuilder

Applies a highlight color to the current run.

Parameters

highlight DocumentFormat.OpenXml.Wordprocessing.HighlightColorValues requiredposition: 0
Highlight color.
public TextBuilder ItalicOn() #
Returns: TextBuilder

Applies italic formatting to the current run.

public TextBuilder Outline() #
Returns: TextBuilder

Applies outline formatting to the current run.

public TextBuilder Shadow() #
Returns: TextBuilder

Applies shadow formatting to the current run.

public TextBuilder SmallCaps() #
Returns: TextBuilder

Applies small caps formatting to the current run.

public TextBuilder Strike(Boolean isStrike = true) #
Returns: TextBuilder

Applies single strikethrough formatting to the current run.

Parameters

isStrike System.Boolean = true optionalposition: 0
Whether to apply strikethrough.
public TextBuilder SubScript() #
Returns: TextBuilder

Sets the text as subscript.

public TextBuilder SuperScript() #
Returns: TextBuilder

Sets the text as superscript.

public TextBuilder Underline(UnderlineValues underline) #
Returns: TextBuilder

Applies underline formatting to the current run.

Parameters

underline DocumentFormat.OpenXml.Wordprocessing.UnderlineValues requiredposition: 0
Underline style.

Properties

public WordParagraph Paragraph { get; } #

Gets the paragraph associated with this builder.