Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeRichTextParagraph

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Modifiers sealed

A paragraph whose styled runs and layout are resolved with the drawing's render-time fonts.

Inheritance

  • Object
  • OfficeRichTextParagraph

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Constructors

OfficeRichTextParagraph 2 overloads
public OfficeRichTextParagraph(IReadOnlyList<OfficeRichTextRun> runs, OfficeTextAlignment alignment = Left, Nullable<Double> lineHeight = null, Nullable<OfficeTextPadding> margins = null, Nullable<OfficeTextParagraphIndent> indent = null, Nullable<Double> lineHeightFactor = null) #

Creates a paragraph with independent alignment, line spacing, margins and indentation.

Parameters

runs System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficeRichTextRun} requiredposition: 0
Styled inline content. The collection and runs are copied.
alignment OfficeIMO.Drawing.OfficeTextAlignment = Left optionalposition: 1
Horizontal alignment within the paragraph's margins.
lineHeight System.Nullable{System.Double} = null optionalposition: 2
Optional absolute line height; null uses the shared default.
margins System.Nullable{OfficeIMO.Drawing.OfficeTextPadding} = null optionalposition: 3
Nonnegative paragraph insets. Adjacent vertical margins are added.
indent System.Nullable{OfficeIMO.Drawing.OfficeTextParagraphIndent} = null optionalposition: 4
Offsets of the first and subsequent visual lines.
lineHeightFactor System.Nullable{System.Double} = null optionalposition: 5
Optional multiplier of each line's text extent; mutually exclusive with absolute line height.
public OfficeRichTextParagraph(IReadOnlyList<OfficeRichTextRun> runs, OfficeTextParagraphLabel label, OfficeTextAlignment alignment = Left, Nullable<Double> lineHeight = null, Nullable<OfficeTextPadding> margins = null, Nullable<OfficeTextParagraphIndent> indent = null, Nullable<Double> lineHeightFactor = null) #

Creates a paragraph with a separately styled label and independent continuation indentation.

Parameters

runs System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficeRichTextRun} requiredposition: 0
label OfficeIMO.Drawing.OfficeTextParagraphLabel requiredposition: 1
alignment OfficeIMO.Drawing.OfficeTextAlignment = Left optionalposition: 2
lineHeight System.Nullable{System.Double} = null optionalposition: 3
margins System.Nullable{OfficeIMO.Drawing.OfficeTextPadding} = null optionalposition: 4
indent System.Nullable{OfficeIMO.Drawing.OfficeTextParagraphIndent} = null optionalposition: 5
lineHeightFactor System.Nullable{System.Double} = null optionalposition: 6

Methods

public OfficeRichTextParagraph WithTabStops(OfficeTextTabStops tabStops) #
Returns: OfficeRichTextParagraph

Returns an independent paragraph with these tab settings; null restores legacy tab expansion.

Parameters

tabStops OfficeIMO.Drawing.OfficeTextTabStops requiredposition: 0

Properties

public IReadOnlyList<OfficeRichTextRun> Runs { get; } #

Snapshot of styled inline content.

public OfficeTextAlignment Alignment { get; } #

Horizontal alignment within the paragraph's margins.

public Nullable<Double> LineHeight { get; } #

Absolute line height, or null for the shared default.

public Nullable<Double> LineHeightFactor { get; } #

Multiplier of each line's text extent, or null for the shared default.

public OfficeTextPadding Margins { get; } #

Paragraph insets; adjacent vertical margins are added.

public OfficeTextParagraphIndent Indent { get; } #

First-line and continuation-line offsets.

public OfficeTextParagraphLabel Label { get; } #

Optional list label, painted once on the first visual line.

public OfficeTextTabStops TabStops { get; private set; } #

Optional measured tab settings. Null retains the legacy space-expansion behavior.