Class
Paragraph

Represents a paragraph element in a document model, containing text and formatting properties.

Definition

Namespace:Telerik.Windows.Documents.Model

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class Paragraph : Block

Inheritance: objectDocumentElementBlockParagraph

Inherited Members DocumentElement.GetStyleProperty(IStylePropertyDefinition)DocumentElement.GetStyleProperty(string)DocumentElement.EnumerateChildrenOfType<T>()DocumentElement.GetParentOfType<T>()DocumentElement.CreateLayoutBox()DocumentElement.CopyPropertiesFrom(DocumentElement)DocumentElement.CopyPropertiesFromStyle(StyleDefinition)DocumentElement.ExtractStyleFromProperties()DocumentElement.ExtractStyleFromLocalProperties()DocumentElement.InvalidateAssociatedBoxesArrange()DocumentElement.InvalidateAssociatedBoxesMeasure()DocumentElement.InvalidateAssociatedBoxesLayout()DocumentElement.GetAssociatedLayoutBoxes()DocumentElement.GetRootDocument()DocumentElement.CreateShallowCopy()DocumentElement.GetPropertyValueSource(IStylePropertyDefinition)DocumentElement.ClearValue(IStylePropertyDefinition)DocumentElement.OnStylePropertyChanged(StylePropertyChangeEventArgs)DocumentElement.OnParentChanging()DocumentElement.OnParentChanged()DocumentElement.ChildIndexDocumentElement.HasStyleDocumentElement.StyleDocumentElement.StyleNameDocumentElement.TagDocumentElement.FirstLayoutBoxDocumentElement.IsFirstLayoutBoxInitializedDocumentElement.DocumentElementsDocumentElement.ParentDocumentElement.ChildrenDocumentElement.PreviousSiblingDocumentElement.NextSiblingDocumentElement.CursorDocumentElement.StyleChangingDocumentElement.StyleChangedDocumentElement.StylePropertyChangedDocumentElement.ParentChangingDocumentElement.ParentChangedDocumentElement.PropertyValueChanged

Constructors

Paragraph()

Initializes a new instance of the Paragraph class.

Declaration

cs-api-definition
public Paragraph()

Paragraph(Paragraph)

Initializes a new instance of the Paragraph class by copying an already existing Paragraph.

Declaration

cs-api-definition
public Paragraph(Paragraph originalParagraph)

Parameters

originalParagraph

Paragraph

The original paragraph.

Fields

AutomaticSpacingAfterProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<bool?, ParagraphProperties> AutomaticSpacingAfterProperty

Field Value

StylePropertyDefinition<bool?, ParagraphProperties>

AutomaticSpacingBeforeProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<bool?, ParagraphProperties> AutomaticSpacingBeforeProperty

Field Value

StylePropertyDefinition<bool?, ParagraphProperties>

BackgroundProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<Color?, ParagraphProperties> BackgroundProperty

Field Value

StylePropertyDefinition<Color?, ParagraphProperties>

FirstLineIndentProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<double?, ParagraphProperties> FirstLineIndentProperty

Field Value

StylePropertyDefinition<double?, ParagraphProperties>

FlowDirectionProperty

The flow direction property.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<FlowDirection?, ParagraphProperties> FlowDirectionProperty

Field Value

StylePropertyDefinition<FlowDirection?, ParagraphProperties>

IsLineBreakingRuleEnabledProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<bool?, ParagraphProperties> IsLineBreakingRuleEnabledProperty

Field Value

StylePropertyDefinition<bool?, ParagraphProperties>

KeepLinesProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<bool?, ParagraphProperties> KeepLinesProperty

Field Value

StylePropertyDefinition<bool?, ParagraphProperties>

LeftIndentProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<double?, ParagraphProperties> LeftIndentProperty

Field Value

StylePropertyDefinition<double?, ParagraphProperties>

LineSpacingProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<double?, ParagraphProperties> LineSpacingProperty

Field Value

StylePropertyDefinition<double?, ParagraphProperties>

LineSpacingTypeProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<LineSpacingType?, ParagraphProperties> LineSpacingTypeProperty

Field Value

StylePropertyDefinition<LineSpacingType?, ParagraphProperties>

ListIdProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<int?, ParagraphProperties> ListIdProperty

Field Value

StylePropertyDefinition<int?, ParagraphProperties>

ListLevelProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<int?, ParagraphProperties> ListLevelProperty

Field Value

StylePropertyDefinition<int?, ParagraphProperties>

OutlineLevelProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<int?, ParagraphProperties> OutlineLevelProperty

Field Value

StylePropertyDefinition<int?, ParagraphProperties>

RightIndentProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<double?, ParagraphProperties> RightIndentProperty

Field Value

StylePropertyDefinition<double?, ParagraphProperties>

SpacingAfterProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<double?, ParagraphProperties> SpacingAfterProperty

Field Value

StylePropertyDefinition<double?, ParagraphProperties>

SpacingBeforeProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<double?, ParagraphProperties> SpacingBeforeProperty

Field Value

StylePropertyDefinition<double?, ParagraphProperties>

SuppressLineNumbersProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<bool?, ParagraphProperties> SuppressLineNumbersProperty

Field Value

StylePropertyDefinition<bool?, ParagraphProperties>

TextAlignmentProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<RadTextAlignment?, ParagraphProperties> TextAlignmentProperty

Field Value

StylePropertyDefinition<RadTextAlignment?, ParagraphProperties>

ThemeBackgroundProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<ThemeColorsEnum?, ParagraphProperties> ThemeBackgroundProperty

Field Value

StylePropertyDefinition<ThemeColorsEnum?, ParagraphProperties>

ThemeFillShadeProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<string, ParagraphProperties> ThemeFillShadeProperty

Field Value

StylePropertyDefinition<string, ParagraphProperties>

ThemeFillTintProperty

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<string, ParagraphProperties> ThemeFillTintProperty

Field Value

StylePropertyDefinition<string, ParagraphProperties>

Properties

AutomaticSpacingAfter

Gets or sets the automatic spacing after the paragraph. This property determines the spacing that automatically applies after the paragraph, which can affect the overall layout and readability of the document.

Declaration

cs-api-definition
[XamlSerializable]
public bool AutomaticSpacingAfter { get; set; }

Property Value

bool

A double representing the spacing after the paragraph in the specified measurement units.

AutomaticSpacingBefore

Gets or sets a value indicating whether an automatic spacing before should be applied.

Declaration

cs-api-definition
[XamlSerializable]
public bool AutomaticSpacingBefore { get; set; }

Property Value

bool

true if [automatic spacing before]; otherwise, false.

Background

Gets or sets the background.

Declaration

cs-api-definition
[XamlSerializable]
public Color Background { get; set; }

Property Value

Color

The background.

ElementRevisionInfo

Gets or sets the information for revisions on this element.

Declaration

cs-api-definition
[XamlCompositePropertySerializable]
public DocumentElementRevisionInfo ElementRevisionInfo { get; set; }

Property Value

DocumentElementRevisionInfo

The element revision information.

FirstLineIndent

Gets or sets the first line indent.

Declaration

cs-api-definition
[XamlSerializable]
public double FirstLineIndent { get; set; }

Property Value

double

The first line indent.

FlowDirection

Gets or sets the flow direction.

Declaration

cs-api-definition
[XamlSerializable]
public FlowDirection FlowDirection { get; set; }

Property Value

FlowDirection

A value of type FlowDirection.

FontSize

Gets or sets the size of the font for the last paragraph marker.

Declaration

cs-api-definition
[XamlSerializable]
public double FontSize { get; set; }

Property Value

double

The size of the font.

HangingIndent

Gets or sets the hanging indent.

Declaration

cs-api-definition
public double HangingIndent { get; set; }

Property Value

double

The hanging indent.

HasRevisions

Gets a value indicating whether this instance has revisions.

Declaration

cs-api-definition
public bool HasRevisions { get; }

Property Value

bool

true if this instance has revisions; otherwise, false.

Inlines

Gets the collection of Inline elements added as children to this paragraph.

Declaration

cs-api-definition
public InlineCollection Inlines { get; }

Property Value

InlineCollection

The inlines.

IsDeleted

Gets a value indicating whether this instance has been deleted into document with enabled Track Changes.

Declaration

cs-api-definition
public bool IsDeleted { get; }

Property Value

bool

true if this instance is deleted; otherwise, false.

IsEmpty

Gets a value indicating whether this paragraph is empty.

Declaration

cs-api-definition
public bool IsEmpty { get; }

Property Value

bool

true if the paragraph doesn't contain inlines; otherwise, false.

IsHeading

Gets a value indicating whether a heading style is applied to this paragraph.

Declaration

cs-api-definition
public bool IsHeading { get; }

Property Value

bool

true if this instance has a heading style; otherwise, false.

IsInList

Gets a value indicating whether this paragraph is included in a list.

Declaration

cs-api-definition
public bool IsInList { get; }

Property Value

bool

true if this instance is in list; otherwise, false.

IsInserted

Gets a value indicating whether this instance has been inserted into document with enabled Track Changes.

Declaration

cs-api-definition
public bool IsInserted { get; }

Property Value

bool

true if this instance is inserted; otherwise, false.

IsLineBreakingRuleEnabled

Gets or sets a value indicating whether East Asian typography rules will be applied to determine which characters may begin and end each line.

Declaration

cs-api-definition
[XamlSerializable(true)]
public bool IsLineBreakingRuleEnabled { get; set; }

Property Value

bool

LeftIndent

Gets or sets the left indent.

Declaration

cs-api-definition
[XamlSerializable]
public double LeftIndent { get; set; }

Property Value

double

The left indent.

LineSpacing

Gets or sets the spacing between the different lines of the paragraph.

Declaration

cs-api-definition
[XamlSerializable]
public double LineSpacing { get; set; }

Property Value

double

The line spacing.

LineSpacingType

Specifies the line spacing type of a paragraph.

Declaration

cs-api-definition
[XamlSerializable]
public LineSpacingType LineSpacingType { get; set; }

Property Value

LineSpacingType

ListId

Gets or sets identifier number of the list the paragraph is included in. The default value is -1 - the paragraph is not included in a list.

Declaration

cs-api-definition
[XamlSerializable(-1)]
public int ListId { get; set; }

Property Value

int

The list identifier.

ListLevel

Gets or sets the list level.

Declaration

cs-api-definition
[XamlSerializable(0)]
public int ListLevel { get; set; }

Property Value

int

The list level.

OutlineLevel

Gets or sets a value indicating the outline level. The outline level defines the level of this paragraph in TOC field. The default value is 0 - no level.

Declaration

cs-api-definition
[XamlSerializable(0)]
public int OutlineLevel { get; set; }

Property Value

int

The outline level.

RightIndent

Gets or sets the right indent.

Declaration

cs-api-definition
[XamlSerializable]
public double RightIndent { get; set; }

Property Value

double

The right indent.

SpacingAfter

Gets or sets the spacing after the paragraph.

Declaration

cs-api-definition
[XamlSerializable]
public double SpacingAfter { get; set; }

Property Value

double

A double value representing the spacing, in pixels, that follows the paragraph.

SpacingBefore

Gets or sets the spacing before the paragraph.

Declaration

cs-api-definition
[XamlSerializable]
public double SpacingBefore { get; set; }

Property Value

double

The spacing before.

SuppressLineNumbers

Gets or sets the value indicating whether the line numbering for the current Paragraph is suppressed.

Declaration

cs-api-definition
[XamlSerializable]
public bool SuppressLineNumbers { get; set; }

Property Value

bool

The line numbering.

TabStops

Gets or sets the tab stops.

Declaration

cs-api-definition
[XamlCompositePropertySerializable]
public TabStopCollection TabStops { get; set; }

Property Value

TabStopCollection

The tab stops.

TextAlignment

Gets or sets the text alignment.

Declaration

cs-api-definition
[XamlSerializable]
public RadTextAlignment TextAlignment { get; set; }

Property Value

RadTextAlignment

A value of type RadTextAlignment.

ThemeBackground

Gets or sets the theme background.

Declaration

cs-api-definition
[XamlSerializable]
public ThemeColorsEnum ThemeBackground { get; set; }

Property Value

ThemeColorsEnum

The theme background.

ThemeFillShade

Gets or sets the theme fill shade.

Declaration

cs-api-definition
[XamlSerializable]
public string ThemeFillShade { get; set; }

Property Value

string

The theme fill shade.

ThemeFillTint

Gets or sets the theme fill tint.

Declaration

cs-api-definition
[XamlSerializable]
public string ThemeFillTint { get; set; }

Property Value

string

The theme fill tint.

Methods

CopyPropertiesFromOverride(DocumentElement)

Copies the properties from another Paragraph to the current instance.

Declaration

cs-api-definition
protected override void CopyPropertiesFromOverride(DocumentElement fromElement)

Parameters

fromElement

DocumentElement

The Paragraph to copy the properties from.

Overrides DocumentElement.CopyPropertiesFromOverride(DocumentElement)

CreateDeepCopy()

Creates a deep copy of the element.

Declaration

cs-api-definition
public override DocumentElement CreateDeepCopy()

Returns

DocumentElement

The copied element.

Overrides DocumentElement.CreateDeepCopy()

CreateLayoutBox(DocumentStructureCollection)

Creates a ParagraphLayoutBox for the element.

Declaration

cs-api-definition
public override LayoutBox CreateLayoutBox(DocumentStructureCollection documentCollection)

Parameters

documentCollection

DocumentStructureCollection

The document collection.

Returns

LayoutBox

Overrides DocumentElement.CreateLayoutBox(DocumentStructureCollection)

CreateNewElementInstance()

Creates a new Paragraph instance.

Declaration

cs-api-definition
protected override DocumentElement CreateNewElementInstance()

Returns

DocumentElement

The new instance.

Overrides DocumentElement.CreateNewElementInstance()

HasSameStyle(Paragraph)

Determines whether the current instance has the same style properties as another one.

Declaration

cs-api-definition
public virtual bool HasSameStyle(Paragraph other)

Parameters

other

Paragraph

The other.

Returns

bool

true if the current instance has the same style properties as the other one; otherwise, false.

OnRemoved()

Called when a DocumentElement is removed.

Declaration

cs-api-definition
protected override void OnRemoved()

Overrides DocumentElement.OnRemoved()

OnStyleChanged()

Called after the style of a document element has been changed.

Declaration

cs-api-definition
protected override void OnStyleChanged()

Overrides DocumentElement.OnStyleChanged()

OnStyleChanging()

Called before the style of a document element changes.

Declaration

cs-api-definition
protected override void OnStyleChanging()

Overrides DocumentElement.OnStyleChanging()

OnTabStopsChanged()

Called when TabStops collection changes.

Declaration

cs-api-definition
protected virtual void OnTabStopsChanged()

RemoveFromList()

Removes the paragraph from a list.

Declaration

cs-api-definition
public void RemoveFromList()

Events

TabStopsChanged

Occurs when the TabStops collection changes.

Declaration

cs-api-definition
public event EventHandler TabStopsChanged

Event Value

EventHandler