Paragraph
Represents a block of inline content with paragraph-level layout, list, and revision settings.
Definition
Namespace:Telerik.WinForms.Documents.Model
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class Paragraph : Block, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor
Inheritance: objectDisposableObjectRadObjectDocumentElementBlockParagraph...
Implements:
Inherited Members
Constructors
Initializes a new instance of the Paragraph class.
public Paragraph()
Fields
Defines whether automatic spacing after a paragraph is enabled; the default is false.
public static readonly StylePropertyDefinition<bool?, ParagraphProperties> AutomaticSpacingAfterProperty
Defines whether automatic spacing before a paragraph is enabled; the default is false.
public static readonly StylePropertyDefinition<bool?, ParagraphProperties> AutomaticSpacingBeforeProperty
Defines the paragraph background color style property; the default is transparent.
public static readonly StylePropertyDefinition<Color?, ParagraphProperties> BackgroundProperty
Defines the layout-affecting style property for first-line indentation. For list paragraphs without a local override, the effective value is calculated from the list-item marker and indentation step.
public static readonly StylePropertyDefinition<double?, ParagraphProperties> FirstLineIndentProperty
The flow direction property.
public static readonly StylePropertyDefinition<FlowDirection?, ParagraphProperties> FlowDirectionProperty
Defines whether East Asian line-breaking rules are applied; the default is true.
public static readonly StylePropertyDefinition<bool?, ParagraphProperties> IsLineBreakingRuleEnabledProperty
Defines whether the paragraph's lines are kept together; the default is false.
public static readonly StylePropertyDefinition<bool?, ParagraphProperties> KeepLinesProperty
Defines the layout-affecting style property for the paragraph's left indent. List-level indentation can supply the effective value when the paragraph has no local override.
public static readonly StylePropertyDefinition<double?, ParagraphProperties> LeftIndentProperty
Defines the layout-affecting line-spacing style property; its default value comes from DEFAULT_LINE_SPACING.
public static readonly StylePropertyDefinition<double?, ParagraphProperties> LineSpacingProperty
Defines how the LineSpacingProperty value is interpreted; the default is Auto.
public static readonly StylePropertyDefinition<LineSpacingType?, ParagraphProperties> LineSpacingTypeProperty
Defines the list identifier property; a default value of -1 means the paragraph is not assigned to a list.
public static readonly StylePropertyDefinition<int?, ParagraphProperties> ListIdProperty
Defines the list nesting-level property; the default level is zero.
public static readonly StylePropertyDefinition<int?, ParagraphProperties> ListLevelProperty
Defines the paragraph outline-level property used when generating a table of contents; zero means no outline level.
public static readonly StylePropertyDefinition<int?, ParagraphProperties> OutlineLevelProperty
Defines the layout-affecting style property for the paragraph's right indent; the default is zero.
public static readonly StylePropertyDefinition<double?, ParagraphProperties> RightIndentProperty
Defines the layout-affecting style property for space after a paragraph; the default comes from PARAGRAPH_DEFAULT_SPACING_AFTER.
public static readonly StylePropertyDefinition<double?, ParagraphProperties> SpacingAfterProperty
Defines the layout-affecting style property for space before a paragraph; the default is zero.
public static readonly StylePropertyDefinition<double?, ParagraphProperties> SpacingBeforeProperty
Defines whether line numbering is suppressed for the paragraph; the default is false.
public static readonly StylePropertyDefinition<bool?, ParagraphProperties> SuppressLineNumbersProperty
Defines the paragraph text-alignment property, which affects line arrangement and defaults to left alignment.
public static readonly StylePropertyDefinition<RadTextAlignment?, ParagraphProperties> TextAlignmentProperty
Defines the theme color role used for the paragraph background; the default indicates no theme color.
public static readonly StylePropertyDefinition<ThemeColorsEnum?, ParagraphProperties> ThemeBackgroundProperty
Defines the serialized theme-fill shade value for the paragraph background.
public static readonly StylePropertyDefinition<string, ParagraphProperties> ThemeFillShadeProperty
Defines the serialized theme-fill tint value for the paragraph background.
public static readonly StylePropertyDefinition<string, ParagraphProperties> ThemeFillTintProperty
Properties
Gets or sets whether automatic spacing after this paragraph is enabled.
[XamlSerializable]
public bool AutomaticSpacingAfter { get; set; }
Gets or sets a value indicating whether an automatic spacing before should be applied.
[XamlSerializable]
public bool AutomaticSpacingBefore { get; set; }
true if [automatic spacing before]; otherwise, false.
Gets or sets the background.
[XamlSerializable]
public Color Background { get; set; }
The background.
Gets or sets the information for revisions on this element.
[XamlCompositePropertySerializable]
public DocumentElementRevisionInfo ElementRevisionInfo { get; set; }
The element revision information.
Gets or sets the first line indent.
[XamlSerializable]
public double FirstLineIndent { get; set; }
The first line indent.
Gets or sets the flow direction.
[XamlSerializable(FlowDirection.LeftToRight)]
public FlowDirection FlowDirection { get; set; }
A value of type FlowDirection.
Gets or sets the size of the font for the last paragraph marker.
[XamlSerializable]
public double FontSize { get; set; }
The size of the font.
Gets or sets the hanging indent.
public double HangingIndent { get; set; }
The hanging indent.
Gets a value indicating whether this instance has revisions.
public bool HasRevisions { get; }
true if this instance has revisions; otherwise, false.
Gets the collection of Inline elements added as children to this paragraph.
public InlineCollection Inlines { get; }
The inlines.
Gets a value indicating whether this instance has been deleted into document with enabled Track Changes.
public bool IsDeleted { get; }
true if this instance is deleted; otherwise, false.
Gets a value indicating whether this paragraph is empty.
public bool IsEmpty { get; }
true if the paragraph doesn't contain inlines; otherwise, false.
Gets a value indicating whether a heading style is applied to this paragraph.
public bool IsHeading { get; }
true if this instance has a heading style; otherwise, false.
Gets a value indicating whether this paragraph is included in a list.
public bool IsInList { get; }
true if this instance is in list; otherwise, false.
Gets a value indicating whether this instance has been inserted into document with enabled Track Changes.
public bool IsInserted { get; }
true if this instance is inserted; otherwise, false.
Gets or sets a value indicating whether East Asian typography rules will be applied to determine which characters may begin and end each line.
[XamlSerializable(true)]
public bool IsLineBreakingRuleEnabled { get; set; }
Gets or sets the left indent.
[XamlSerializable]
public double LeftIndent { get; set; }
The left indent.
Gets or sets the spacing between the different lines of the paragraph.
[XamlSerializable]
public double LineSpacing { get; set; }
The line spacing.
Gets or sets how the line spacing value is applied: automatically, as a minimum, or exactly.
[XamlSerializable]
public LineSpacingType LineSpacingType { get; set; }
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.
[XamlSerializable(-1)]
public int ListId { get; set; }
The list identifier.
Gets or sets the list level.
[XamlSerializable(0)]
public int ListLevel { get; set; }
The list level.
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.
[XamlSerializable(0)]
public int OutlineLevel { get; set; }
The outline level.
Gets or sets the right indent.
[XamlSerializable]
public double RightIndent { get; set; }
The right indent.
Gets or sets the space after this paragraph.
[XamlSerializable]
public double SpacingAfter { get; set; }
Gets or sets the spacing before the paragraph.
[XamlSerializable]
public double SpacingBefore { get; set; }
The spacing before.
Gets or sets the value indicating whether the line numbering for the current Paragraph is suppressed.
[XamlSerializable]
public bool SuppressLineNumbers { get; set; }
The line numbering.
Gets or sets the tab stops.
[XamlCompositePropertySerializable]
public TabStopCollection TabStops { get; set; }
The tab stops.
Gets or sets the text alignment.
[XamlSerializable]
public RadTextAlignment TextAlignment { get; set; }
A value of type RadTextAlignment.
Gets or sets the theme background.
[XamlSerializable]
public ThemeColorsEnum ThemeBackground { get; set; }
The theme background.
Gets or sets the theme fill shade.
[XamlSerializable]
public string ThemeFillShade { get; set; }
The theme fill shade.
Gets or sets the theme fill tint.
[XamlSerializable]
public string ThemeFillTint { get; set; }
The theme fill tint.
Methods
Copies the properties from another Paragraph to the current instance.
protected override void CopyPropertiesFromOverride(DocumentElement fromElement)
The Paragraph to copy the properties from.
Overrides:
Creates a deep copy of the element.
public override DocumentElement CreateDeepCopy()
The copied element.
Overrides:
Creates a ParagraphLayoutBox for the element.
public override LayoutBox CreateLayoutBox(DocumentStructureCollection documentCollection)
The document collection.
Returns:Overrides:
Creates a new Paragraph instance.
protected override DocumentElement CreateNewElementInstance()
The new instance.
Overrides:
Detaches the paragraph from its tab-stop change notifications when it is removed.
protected override void OnRemoved()
Overrides:
Attaches tab-stop notifications from the new style and refreshes the paragraph's tab-stop state.
protected override void OnStyleChanged()
Overrides:
Detaches tab-stop notifications from the current style before the style changes.
protected override void OnStyleChanging()
Overrides:
Called when TabStops collection changes.
protected virtual void OnTabStopsChanged()
Removes the paragraph from a list.
public void RemoveFromList()
Events
Occurs when the TabStops collection changes.
public event EventHandler TabStopsChanged