ClassParagraphProperties
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:
public sealed class ParagraphProperties : DocumentElementPropertiesBase, IElementWithStyle, IPropertiesWithShading
Inheritance: objectDocumentElementPropertiesBaseParagraphProperties
Implements:
Inherited Members
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
public IStyleProperty<bool?> AllowOverflowPunctuation { get; }
Property Value
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
public IStyleProperty<bool?> ApplyEastAsianLineBreakingRules { get; }
Property Value
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
public IStyleProperty<bool?> AutomaticSpacingAfter { get; }
Property Value
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
public IStyleProperty<bool?> AutomaticSpacingBefore { get; }
Property Value
The automatic spacing after.
BackgroundColor
Controls the background fill color behind the paragraph's content, supporting theme-aware colors.
Declaration
public IStyleProperty<ThemableColor> BackgroundColor { get; }
Property Value
IStyleProperty<ThemableColor>
The color of the background.
Implements
Borders
Configures decorative borders around the paragraph's edges, including style, width, and color for each side.
Declaration
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
public IStyleProperty<bool?> ContextualSpacing { get; }
Property Value
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
public IStyleProperty<double?> FirstLineIndent { get; }
Property Value
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
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
public IStyleProperty<double?> HangingIndent { get; }
Property Value
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
public IStyleProperty<bool?> KeepOnOnePage { get; }
Property Value
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
public IStyleProperty<bool?> KeepWithNextParagraph { get; }
Property Value
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
public IStyleProperty<double?> LeftIndent { get; }
Property Value
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
public IStyleProperty<double?> LineSpacing { get; }
Property Value
The line spacing value.
LineSpacingType
Determines how line spacing is calculated, specifying whether values are absolute or proportional to font size.
Declaration
public IStyleProperty<HeightType?> LineSpacingType { get; }
Property Value
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
public IStyleProperty<int?> ListId { get; }
Property Value
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
public IStyleProperty<int?> ListLevel { get; }
Property Value
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
public IStyleProperty<bool?> MirrorIndents { get; }
Property Value
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
public IStyleProperty<OutlineLevel?> OutlineLevel { get; }
Property Value
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
public IStyleProperty<bool?> PageBreakBefore { get; }
Property Value
The default value is false
ParagraphMarkerProperties
Configures character formatting for the paragraph marker glyph, which visually represents the paragraph in editing contexts.
Declaration
public CharacterProperties ParagraphMarkerProperties { get; }
Property Value
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
public IStyleProperty<double?> RightIndent { get; }
Property Value
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
public IStyleProperty<ShadingPattern?> ShadingPattern { get; }
Property Value
IStyleProperty<ShadingPattern?>
The default value is Clear
Implements
ShadingPatternColor
Controls the foreground color of the shading pattern overlaid on the background, supporting theme-aware colors.
Declaration
public IStyleProperty<ThemableColor> ShadingPatternColor { get; }
Property Value
IStyleProperty<ThemableColor>
The color of the pattern.
Implements
SpacingAfter
Controls spacing added after the paragraph's last line, in device-independent pixels (1/96 inch).
Declaration
public IStyleProperty<double?> SpacingAfter { get; }
Property Value
The spacing after value.
SpacingBefore
Controls spacing added above the paragraph's first line, in device-independent pixels (1/96 inch).
Declaration
public IStyleProperty<double?> SpacingBefore { get; }
Property Value
The spacing before value.
TabStops
Manages custom tab stop positions within the paragraph for precise alignment of tabbed content.
Declaration
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
public IStyleProperty<Alignment?> TextAlignment { get; }
Property Value
The default value is Left
Methods
CopyPropertiesFrom(DocumentElementPropertiesBase)
Copy properties from specified source.
Declaration
public override void CopyPropertiesFrom(DocumentElementPropertiesBase fromProperties)
Parameters
fromProperties
The source from which to copy the properties.
Overrides
EnumerateStyleProperties()
Enumerates the style properties.
Declaration
protected override IEnumerable<IStyleProperty> EnumerateStyleProperties()
Returns
IEnumerable<IStyleProperty>
The style properties.
Overrides
GetStylePropertyOverride(IStylePropertyDefinition)
Gets specific style property or null.
Declaration
protected override IStyleProperty GetStylePropertyOverride(IStylePropertyDefinition propertyDefinition)
Parameters
propertyDefinition
The property definition.
Returns
Overrides