ParagraphProperties
Provides style-resolved paragraph formatting values for a document element or paragraph style.
Definition
Namespace:Telerik.WinForms.Documents.Model.Styles
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class ParagraphProperties : DocumentElementPropertiesBase, IElementWithStyle
Inheritance: objectDocumentElementPropertiesBaseParagraphProperties
Implements:
Inherited Members
Constructors
Initializes paragraph properties owned by a document element.
public ParagraphProperties(DocumentElement owner)
The document element that owns these properties.
Initializes paragraph properties owned by a style definition.
public ParagraphProperties(StyleDefinition owner)
The paragraph style that owns these properties.
Properties
Gets or sets whether automatic spacing after the paragraph is enabled.
[XamlSerializable]
public bool AutomaticSpacingAfter { get; set; }
Gets or sets whether automatic spacing before the paragraph is enabled.
[XamlSerializable]
public bool AutomaticSpacingBefore { get; set; }
Gets or sets the paragraph background color. Assigning a different color clears ThemeBackground.
[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.
[XamlSerializable]
public double FirstLineIndent { get; set; }
Gets or sets the direction in which paragraph content is laid out.
[XamlSerializable]
public FlowDirection FlowDirection { get; set; }
Gets or sets whether East Asian line-breaking rules determine which characters may begin or end a line.
[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.
[XamlSerializable]
public double LeftIndent { get; set; }
Gets or sets the spacing value used between paragraph lines; LineSpacingType determines how it is applied.
[XamlSerializable]
public double LineSpacing { get; set; }
Gets or sets whether LineSpacing is automatic, a minimum, or an exact distance.
[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.
[XamlSerializable(-1)]
public int ListId { get; set; }
Gets or sets the paragraph's nesting level within its list.
[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.
[XamlSerializable(0)]
public int OutlineLevel { get; set; }
Gets or sets the paragraph's right indent, in document layout units.
[XamlSerializable]
public double RightIndent { get; set; }
Gets or sets the vertical spacing after the paragraph, in document layout units.
[XamlSerializable]
public double SpacingAfter { get; set; }
Gets or sets the vertical spacing before the paragraph, in document layout units.
[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.
[XamlCompositePropertySerializable]
public TabStopCollection TabStops { get; set; }
Gets or sets the alignment applied to the paragraph's lines.
[XamlSerializable]
public RadTextAlignment TextAlignment { get; set; }
Gets or sets the theme color role used for the paragraph background.
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeBackground { get; set; }
Gets or sets the serialized shade adjustment for the theme background.
[XamlSerializable]
public string ThemeFillShade { get; set; }
Gets or sets the serialized tint adjustment for the theme background.
[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.
public override void CopyPropertiesFrom(DocumentElementPropertiesBase fromProperties)
The source properties container.
Overrides:
Creates a paragraph-property container associated with the current owning document element.
protected override DocumentElementPropertiesBase CreateInstance()
A new ParagraphProperties instance.
Overrides:
Creates and registers the property instances supported by the concrete container. Called by the base constructors after the owner is assigned.
protected override void InitProperties()
Overrides:
Raises TabStopsChanged after the tab-stop collection changes.
protected virtual void OnTabStopsChanged()
Rejects style definitions that are not paragraph styles.
protected override void ValidateStyleType(StyleDefinition value)
The style definition to validate.
Exceptions: InvalidOperationExceptionThe style is not a paragraph style.
Overrides:
Events
Occurs when the tab-stop collection changes or is replaced.
public event EventHandler TabStopsChanged