Class
ParagraphProperties

Configures formatting and behavior for Paragraph elements, including alignment, spacing, indentation, borders, shading, and list association with inheritance from styles and document defaults.

Definition

Namespace:Telerik.Windows.Documents.Flow.Model.Styles

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

cs-api-definition
public sealed class ParagraphProperties : DocumentElementPropertiesBase, IElementWithStyle, IPropertiesWithShading

Inheritance: objectDocumentElementPropertiesBaseParagraphProperties

Implements: IElementWithStyleIPropertiesWithShading

Inherited Members DocumentElementPropertiesBase.GetStyleProperty(IStylePropertyDefinition)DocumentElementPropertiesBase.ClearLocalValues()DocumentElementPropertiesBase.HasLocalValues()DocumentElementPropertiesBase.StylePropertiesDocumentElementPropertiesBase.StyleId

Properties

AllowOverflowPunctuation

Permits trailing punctuation to extend beyond the paragraph margin during line breaking, improving text flow for punctuation-heavy content; defaults to true. This property is local-only and not inherited.

Declaration

cs-api-definition
public IStyleProperty<bool?> AllowOverflowPunctuation { get; }

Property Value

IStyleProperty<bool?>

The default is true.

ApplyEastAsianLineBreakingRules

Enables East-Asian typography line-breaking rules for the paragraph, affecting where lines wrap in CJK text; defaults to true.

Declaration

cs-api-definition
public IStyleProperty<bool?> ApplyEastAsianLineBreakingRules { get; }

Property Value

IStyleProperty<bool?>

The default value is true.

AutomaticSpacingAfter

Enables automatic calculation of spacing after the paragraph based on its content, allowing consumers to optimize inter-paragraph spacing dynamically.

Declaration

cs-api-definition
public IStyleProperty<bool?> AutomaticSpacingAfter { get; }

Property Value

IStyleProperty<bool?>

The automatic spacing after.

AutomaticSpacingBefore

Enables automatic calculation of spacing before the paragraph based on its content, allowing consumers to optimize inter-paragraph spacing dynamically.

Declaration

cs-api-definition
public IStyleProperty<bool?> AutomaticSpacingBefore { get; }

Property Value

IStyleProperty<bool?>

The automatic spacing after.

BackgroundColor

Controls the background fill color behind the paragraph's content, supporting theme-aware colors.

Declaration

cs-api-definition
public IStyleProperty<ThemableColor> BackgroundColor { get; }

Property Value

IStyleProperty<ThemableColor>

The color of the background.

Implements IPropertiesWithShading.BackgroundColor

Borders

Configures decorative borders around the paragraph's edges, including style, width, and color for each side.

Declaration

cs-api-definition
public IStyleProperty<ParagraphBorders> Borders { get; }

Property Value

IStyleProperty<ParagraphBorders>

The paragraph borders.

ContextualSpacing

Suppresses spacing before and after the paragraph when adjacent paragraphs share the same style, reducing visual gaps in homogeneous content; defaults to false.

Declaration

cs-api-definition
public IStyleProperty<bool?> ContextualSpacing { get; }

Property Value

IStyleProperty<bool?>

The default value is false.

FirstLineIndent

Controls additional indentation applied exclusively to the paragraph's first line, in device-independent pixels (1/96 inch).

Declaration

cs-api-definition
public IStyleProperty<double?> FirstLineIndent { get; }

Property Value

IStyleProperty<double?>

The first line indent.

FlowDirection

Controls text flow direction for the paragraph, affecting how inline content is laid out and rendered; defaults to LeftToRight.

Declaration

cs-api-definition
public IStyleProperty<FlowDirection?> FlowDirection { get; }

Property Value

IStyleProperty<FlowDirection?>

The default value is LeftToRight

HangingIndent

Outdents the paragraph's first line relative to subsequent lines, creating a hanging indent effect in device-independent pixels (1/96 inch).

Declaration

cs-api-definition
public IStyleProperty<double?> HangingIndent { get; }

Property Value

IStyleProperty<double?>

The hanging indent.

KeepOnOnePage

Prevents the paragraph from breaking across pages during pagination, keeping all lines together on a single page; defaults to false.

Declaration

cs-api-definition
public IStyleProperty<bool?> KeepOnOnePage { get; }

Property Value

IStyleProperty<bool?>

The default value is false

KeepWithNextParagraph

Prevents page breaks between this paragraph and the next during pagination, ensuring they appear together when possible; defaults to false.

Declaration

cs-api-definition
public IStyleProperty<bool?> KeepWithNextParagraph { get; }

Property Value

IStyleProperty<bool?>

The default value is false

LeftIndent

Controls indentation from the left margin for all lines in the paragraph, in device-independent pixels (1/96 inch).

Declaration

cs-api-definition
public IStyleProperty<double?> LeftIndent { get; }

Property Value

IStyleProperty<double?>

The left indent.

LineSpacing

Controls vertical spacing between lines within the paragraph.

If LineSpacingType is Auto then the line height value times the value of the property, otherwise the value is in device independent pixels (1/96 inch).

Declaration

cs-api-definition
public IStyleProperty<double?> LineSpacing { get; }

Property Value

IStyleProperty<double?>

The line spacing value.

LineSpacingType

Determines how line spacing is calculated, specifying whether values are absolute or proportional to font size.

Declaration

cs-api-definition
public IStyleProperty<HeightType?> LineSpacingType { get; }

Property Value

IStyleProperty<HeightType?>

The type line spacing rule.

ListId

Associates the paragraph with a numbered or bulleted list by referencing the list's identifier; defaults to -1 (no list association).

Declaration

cs-api-definition
public IStyleProperty<int?> ListId { get; }

Property Value

IStyleProperty<int?>

The default value is -1 - list style is not referenced.

ListLevel

Specifies the hierarchical level within the associated list (0-8), determining indentation and numbering format; defaults to -1 (no level).

Declaration

cs-api-definition
public IStyleProperty<int?> ListLevel { get; }

Property Value

IStyleProperty<int?>

The default value is -1 - list level is not referenced.

MirrorIndents

Swaps left and right indents on odd-numbered pages for mirrored layout in facing-page scenarios; defaults to false.

Declaration

cs-api-definition
public IStyleProperty<bool?> MirrorIndents { get; }

Property Value

IStyleProperty<bool?>

The default value is false.

OutlineLevel

Assigns the paragraph to a hierarchical outline level for document structure and table-of-contents generation; defaults to Level9 (no level).

Declaration

cs-api-definition
public IStyleProperty<OutlineLevel?> OutlineLevel { get; }

Property Value

IStyleProperty<OutlineLevel?>

The default value is Level9 - no level.

PageBreakBefore

Forces the paragraph to start on a new page during pagination, inserting an automatic page break before it; defaults to false.

Declaration

cs-api-definition
public IStyleProperty<bool?> PageBreakBefore { get; }

Property Value

IStyleProperty<bool?>

The default value is false

ParagraphMarkerProperties

Configures character formatting for the paragraph marker glyph, which visually represents the paragraph in editing contexts.

Declaration

cs-api-definition
public CharacterProperties ParagraphMarkerProperties { get; }

Property Value

CharacterProperties

The paragraph marker properties.

RightIndent

Controls indentation from the right margin for all lines in the paragraph, in device-independent pixels (1/96 inch).

Declaration

cs-api-definition
public IStyleProperty<double?> RightIndent { get; }

Property Value

IStyleProperty<double?>

The left indent.

ShadingPattern

Specifies the fill pattern style overlaid on the paragraph's background, determining how the pattern color blends with the background; defaults to Clear.

Declaration

cs-api-definition
public IStyleProperty<ShadingPattern?> ShadingPattern { get; }

Property Value

IStyleProperty<ShadingPattern?>

The default value is Clear

Implements IPropertiesWithShading.ShadingPattern

ShadingPatternColor

Controls the foreground color of the shading pattern overlaid on the background, supporting theme-aware colors.

Declaration

cs-api-definition
public IStyleProperty<ThemableColor> ShadingPatternColor { get; }

Property Value

IStyleProperty<ThemableColor>

The color of the pattern.

Implements IPropertiesWithShading.ShadingPatternColor

SpacingAfter

Controls spacing added after the paragraph's last line, in device-independent pixels (1/96 inch).

Declaration

cs-api-definition
public IStyleProperty<double?> SpacingAfter { get; }

Property Value

IStyleProperty<double?>

The spacing after value.

SpacingBefore

Controls spacing added above the paragraph's first line, in device-independent pixels (1/96 inch).

Declaration

cs-api-definition
public IStyleProperty<double?> SpacingBefore { get; }

Property Value

IStyleProperty<double?>

The spacing before value.

TabStops

Manages custom tab stop positions within the paragraph for precise alignment of tabbed content.

Declaration

cs-api-definition
public IStyleProperty<TabStopCollection> TabStops { get; }

Property Value

IStyleProperty<TabStopCollection>

The tab stops.

TextAlignment

Controls horizontal alignment of the paragraph content within its container; defaults to Left.

Declaration

cs-api-definition
public IStyleProperty<Alignment?> TextAlignment { get; }

Property Value

IStyleProperty<Alignment?>

The default value is Left

Methods

CopyPropertiesFrom(DocumentElementPropertiesBase)

Copy properties from specified source.

Declaration

cs-api-definition
public override void CopyPropertiesFrom(DocumentElementPropertiesBase fromProperties)

Parameters

fromProperties

DocumentElementPropertiesBase

The source from which to copy the properties.

Overrides DocumentElementPropertiesBase.CopyPropertiesFrom(DocumentElementPropertiesBase)

EnumerateStyleProperties()

Enumerates the style properties.

Declaration

cs-api-definition
protected override IEnumerable<IStyleProperty> EnumerateStyleProperties()

Returns

IEnumerable<IStyleProperty>

The style properties.

Overrides DocumentElementPropertiesBase.EnumerateStyleProperties()

GetStylePropertyOverride(IStylePropertyDefinition)

Gets specific style property or null.

Declaration

cs-api-definition
protected override IStyleProperty GetStylePropertyOverride(IStylePropertyDefinition propertyDefinition)

Parameters

propertyDefinition

IStylePropertyDefinition

The property definition.

Returns

IStyleProperty

Overrides DocumentElementPropertiesBase.GetStylePropertyOverride(IStylePropertyDefinition)