API Reference
Class
TextBuilder
Provides helpers for styling text fragments.
Inheritance
- Object
- TextBuilder
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method TextBuilder.BoldOn
- Method TextBuilder.CapsStyle
- Method TextBuilder.Color
- Method TextBuilder.DoubleStrike
- Method TextBuilder.Emboss
- Method TextBuilder.FontFamily
- Method TextBuilder.FontSize
- Method TextBuilder.Highlight
- Method TextBuilder.ItalicOn
- Method TextBuilder.Outline
- Method TextBuilder.Shadow
- Method TextBuilder.SmallCaps
- Method TextBuilder.Strike
- Method TextBuilder.SubScript
- Method TextBuilder.SuperScript
- Method TextBuilder.Underline
Accepted by parameters
- Method ParagraphBuilder.Run
- Method ParagraphBuilder.Text
Methods
public TextBuilder CapsStyle(CapsStyle capsStyle) #Returns:
TextBuilderApplies capitalization style to the current run.
Parameters
- capsStyle OfficeIMO.Word.CapsStyle
- Capitalization style.
public TextBuilder Color(String hex) #Returns:
TextBuilderSets the text color using a hexadecimal value.
Parameters
- hex System.String
- Color in hexadecimal format.
public TextBuilder DoubleStrike(Boolean isDoubleStrike = true) #Returns:
TextBuilderApplies double strikethrough formatting to the current run.
Parameters
- isDoubleStrike System.Boolean = true
- Whether to apply double strikethrough.
public TextBuilder FontFamily(String fontFamily) #Returns:
TextBuilderSets the font family for the current run.
Parameters
- fontFamily System.String
- Font family name.
public TextBuilder FontSize(Int32 fontSize) #Returns:
TextBuilderSets the font size for the current run.
Parameters
- fontSize System.Int32
- Font size in points.
public TextBuilder Highlight(HighlightColorValues highlight) #Returns:
TextBuilderApplies a highlight color to the current run.
Parameters
- highlight DocumentFormat.OpenXml.Wordprocessing.HighlightColorValues
- Highlight color.
public TextBuilder SmallCaps() #Returns:
TextBuilderApplies small caps formatting to the current run.
public TextBuilder Strike(Boolean isStrike = true) #Returns:
TextBuilderApplies single strikethrough formatting to the current run.
Parameters
- isStrike System.Boolean = true
- Whether to apply strikethrough.
public TextBuilder Underline(UnderlineValues underline) #Returns:
TextBuilderApplies underline formatting to the current run.
Parameters
- underline DocumentFormat.OpenXml.Wordprocessing.UnderlineValues
- Underline style.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
Properties
public WordParagraph Paragraph { get; } #Gets the paragraph associated with this builder.