API Reference
ParagraphBuilder
Builder for paragraphs.
Inheritance
- Object
- ParagraphBuilder
Methods
public ParagraphBuilder Align(HorizontalAlignment alignment) #ParagraphBuilderSets the paragraph alignment.
Parameters
- alignment OfficeIMO.HorizontalAlignment
- Desired alignment.
public ParagraphBuilder Bold(String text) #ParagraphBuilderAppends bold text (Markdown parity helper).
Parameters
- text System.String
public ParagraphBuilder Border(Action<WordParagraphBorders> configure) #ParagraphBuilderConfigures borders for the paragraph.
Parameters
- configure System.Action{OfficeIMO.Word.WordParagraphBorders}
- Callback to configure individual border settings.
public ParagraphBuilder Break(Nullable<BreakValues> breakType = null) #ParagraphBuilderInserts a break into the paragraph.
Parameters
- breakType System.Nullable{DocumentFormat.OpenXml.Wordprocessing.BreakValues} = null
- Optional break type.
public ParagraphBuilder Code(String text) #ParagraphBuilderAppends inline code using a monospace font (Markdown parity helper).
Parameters
- text System.String
public ParagraphBuilder Indentation(Nullable<Double> left = null, Nullable<Double> firstLine = null, Nullable<Double> right = null) #ParagraphBuilderSets indentation values for the paragraph.
Parameters
- left System.Nullable{System.Double} = null
- Left indentation in points.
- firstLine System.Nullable{System.Double} = null
- First-line indentation in points.
- right System.Nullable{System.Double} = null
- Right indentation in points.
public ParagraphBuilder InlineImage(String path, Nullable<Double> widthPx = null, Nullable<Double> heightPx = null, String alt = "") #ParagraphBuilderInserts an inline image into the paragraph.
Parameters
- path System.String
- Path to the image file.
- widthPx System.Nullable{System.Double} = null
- Optional width in pixels.
- heightPx System.Nullable{System.Double} = null
- Optional height in pixels.
- alt System.String = ""
- Alternative text.
public ParagraphBuilder Italic(String text) #ParagraphBuilderAppends italic text (Markdown parity helper).
Parameters
- text System.String
public ParagraphBuilder Justify() #ParagraphBuilderApplies justified alignment to the paragraph.
public ParagraphBuilder LineSpacing(Double points) #ParagraphBuilderSets line spacing for the paragraph.
Parameters
- points System.Double
- Spacing in points.
public ParagraphBuilder Link(String url, String text = null, Boolean style = false) #ParagraphBuilderAdds a hyperlink to the paragraph.
Parameters
- url System.String
- Destination URL.
- text System.String = null
- Optional text to display.
- style System.Boolean = false
- True to apply hyperlink style.
public ParagraphBuilder Run(String text, Action<TextBuilder> configure = null) #ParagraphBuilderAdds a text run to the paragraph.
Parameters
- text System.String
- Text to add.
- configure System.Action{OfficeIMO.Word.Fluent.TextBuilder} = null
- Optional configuration for the run.
public ParagraphBuilder Shading(Color color) #ParagraphBuilderApplies shading to the paragraph.
Parameters
- color SixLabors.ImageSharp.Color
- Fill color.
public ParagraphBuilder SpacingAfter(Double points) #ParagraphBuilderSets spacing after the paragraph.
Parameters
- points System.Double
- Spacing in points.
public ParagraphBuilder SpacingBefore(Double points) #ParagraphBuilderSets spacing before the paragraph.
Parameters
- points System.Double
- Spacing in points.
public ParagraphBuilder Strike(String text) #ParagraphBuilderAppends strikethrough text (Markdown parity helper).
Parameters
- text System.String
public ParagraphBuilder Style(WordParagraphStyles style) #ParagraphBuilderApplies a built-in style to the paragraph.
Parameters
- style OfficeIMO.Word.WordParagraphStyles
- Built-in style.
public ParagraphBuilder Style(String styleId) #ParagraphBuilderApplies a style by its identifier.
Parameters
- styleId System.String
- Style identifier.
public ParagraphBuilder Text(String text, Action<TextBuilder> configure = null) #ParagraphBuilderAdds a text run to the paragraph.
Parameters
- text System.String
- Text to add.
- configure System.Action{OfficeIMO.Word.Fluent.TextBuilder} = null
- Optional configuration for the run.
public ParagraphBuilder Underline(String text) #ParagraphBuilderAppends underlined text (Markdown parity helper).
Parameters
- text System.String
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public WordParagraph Paragraph { get; } #Gets the underlying paragraph.