New to Telerik UI for WinForms? Start a free 30-day trial

Provides style-resolved paragraph formatting values for a document element or paragraph style.

Definition

Constructors

Initializes paragraph properties owned by a document element.

C#
public ParagraphProperties(DocumentElement owner)
Parameters:ownerDocumentElement

The document element that owns these properties.

Initializes paragraph properties owned by a style definition.

C#
public ParagraphProperties(StyleDefinition owner)
Parameters:ownerStyleDefinition

The paragraph style that owns these properties.

Properties

Gets or sets whether automatic spacing after the paragraph is enabled.

C#
[XamlSerializable]
public bool AutomaticSpacingAfter { get; set; }

Gets or sets whether automatic spacing before the paragraph is enabled.

C#
[XamlSerializable]
public bool AutomaticSpacingBefore { get; set; }

Gets or sets the paragraph background color. Assigning a different color clears ThemeBackground.

C#
[XamlSerializable]
public Color Background { get; set; }

Gets or sets the first-line indent. For a list paragraph without a local value, the effective indent is calculated from the list item's marker and indentation step.

C#
[XamlSerializable]
public double FirstLineIndent { get; set; }

Gets or sets the direction in which paragraph content is laid out.

C#
[XamlSerializable]
public FlowDirection FlowDirection { get; set; }

Gets or sets whether East Asian line-breaking rules determine which characters may begin or end a line.

C#
[XamlSerializable]
public bool IsLineBreakingRuleEnabled { get; set; }

Gets or sets the paragraph's left indent. A list level can supply the effective indent when there is no local value.

C#
[XamlSerializable]
public double LeftIndent { get; set; }

Gets or sets the spacing value used between paragraph lines; LineSpacingType determines how it is applied.

C#
[XamlSerializable]
public double LineSpacing { get; set; }

Gets or sets whether LineSpacing is automatic, a minimum, or an exact distance.

C#
[XamlSerializable]
public LineSpacingType LineSpacingType { get; set; }

Gets or sets the identifier of the paragraph's list; -1 indicates that it is not assigned to a list.

C#
[XamlSerializable(-1)]
public int ListId { get; set; }

Gets or sets the paragraph's nesting level within its list.

C#
[XamlSerializable(0)]
public int ListLevel { get; set; }

Gets or sets the paragraph's table-of-contents outline level. Values are restricted to the range 0 through 9, with zero indicating no outline level.

C#
[XamlSerializable(0)]
public int OutlineLevel { get; set; }

Gets or sets the paragraph's right indent, in document layout units.

C#
[XamlSerializable]
public double RightIndent { get; set; }

Gets or sets the vertical spacing after the paragraph, in document layout units.

C#
[XamlSerializable]
public double SpacingAfter { get; set; }

Gets or sets the vertical spacing before the paragraph, in document layout units.

C#
[XamlSerializable]
public double SpacingBefore { get; set; }

Gets or sets the tab stops used by paragraphs with these properties. Replacing the collection updates its owner and raises TabStopsChanged.

C#
[XamlCompositePropertySerializable]
public TabStopCollection TabStops { get; set; }

Gets or sets the alignment applied to the paragraph's lines.

C#
[XamlSerializable]
public RadTextAlignment TextAlignment { get; set; }

Gets or sets the theme color role used for the paragraph background.

C#
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeBackground { get; set; }

Gets or sets the serialized shade adjustment for the theme background.

C#
[XamlSerializable]
public string ThemeFillShade { get; set; }

Gets or sets the serialized tint adjustment for the theme background.

C#
[XamlSerializable]
public string ThemeFillTint { get; set; }

Methods

Copies local property values from another container of the same concrete type. Values supplied by styles or parent elements are not copied; revision metadata is copied when present.

C#
public override void CopyPropertiesFrom(DocumentElementPropertiesBase fromProperties)
Parameters:fromPropertiesDocumentElementPropertiesBase

The source properties container.

Overrides: DocumentElementPropertiesBase.CopyPropertiesFrom(DocumentElementPropertiesBase)

Creates a paragraph-property container associated with the current owning document element.

C#
protected override DocumentElementPropertiesBase CreateInstance()
Returns:

DocumentElementPropertiesBase

A new ParagraphProperties instance.

Overrides: DocumentElementPropertiesBase.CreateInstance()

Creates and registers the property instances supported by the concrete container. Called by the base constructors after the owner is assigned.

C#
protected override void InitProperties()

Overrides: DocumentElementPropertiesBase.InitProperties()

Raises TabStopsChanged after the tab-stop collection changes.

C#
protected virtual void OnTabStopsChanged()

Rejects style definitions that are not paragraph styles.

C#
protected override void ValidateStyleType(StyleDefinition value)
Parameters:valueStyleDefinition

The style definition to validate.

Exceptions: InvalidOperationException

The style is not a paragraph style.

Overrides: DocumentElementPropertiesBase.ValidateStyleType(StyleDefinition)

Events

Occurs when the tab-stop collection changes or is replaced.

C#
public event EventHandler TabStopsChanged