menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Paragraph - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Paragraph

    Reperesents a paragraph

    Inheritance
    System.Object
    EntityBase
    XDLSSerializableBase
    WidgetBase
    WidgetContainer
    Paragraph
    Implements
    IXDLSSerializable
    IWidgetContainer
    IWidget
    IParagraph
    IEntityBase
    IStyleHolder
    Inherited Members
    EntityBase.Document
    EntityBase.DocumentEx
    EntityBase.Owner
    EntityBase.SetOwner(IEntityBase)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    WidgetBase.DrawImpl(CustomGraphics, LayoutedWidget)
    WidgetBase.IWidget.LayoutInfo
    WidgetBase.m_layoutInfo
    WidgetContainer.Count
    XDLSSerializableBase.IXDLSSerializable.ReadXmlAttributes(IXDLSAttributeReader)
    XDLSSerializableBase.IXDLSSerializable.ReadXmlContent(IXDLSContentReader)
    XDLSSerializableBase.IXDLSSerializable.RestoreReference(String, Int32)
    XDLSSerializableBase.IXDLSSerializable.WriteXmlAttributes(IXDLSAttributeWriter)
    XDLSSerializableBase.IXDLSSerializable.WriteXmlContent(IXDLSContentWriter)
    XDLSSerializableBase.IXDLSSerializable.XDLSHolder
    XDLSSerializableBase.m_id
    XDLSSerializableBase.ReadXmlAttributes(IXDLSAttributeReader)
    XDLSSerializableBase.ReadXmlContent(IXDLSContentReader)
    XDLSSerializableBase.WriteXmlAttributes(IXDLSAttributeWriter)
    XDLSSerializableBase.WriteXmlContent(IXDLSContentWriter)
    XDLSSerializableBase.XDLSHolder
    Namespace: Syncfusion.DLS
    Assembly: Syncfusion.DLS.Base.dll
    Syntax
    public class Paragraph : WidgetContainer, IXDLSSerializable, IWidgetContainer, IWidget, IParagraph, IEntityBase, IStyleHolder

    Constructors

    Paragraph(IDocument)

    The default constructor.

    Declaration
    public Paragraph(IDocument doc)
    Parameters
    Type Name Description
    IDocument doc

    Paragraph(IParagraph, IDocument)

    The copy constructor

    Declaration
    protected Paragraph(IParagraph paragraph, IDocument doc)
    Parameters
    Type Name Description
    IParagraph paragraph
    IDocument doc

    Fields

    m_chFormat

    The character format

    Declaration
    protected CharacterFormat m_chFormat
    Field Value
    Type
    CharacterFormat

    m_listFormat

    The list format

    Declaration
    protected ListFormat m_listFormat
    Field Value
    Type
    ListFormat

    m_pItemColl

    The paragraph items

    Declaration
    protected IParagraphItemCollection m_pItemColl
    Field Value
    Type
    IParagraphItemCollection

    m_prFormat

    The paragraph format

    Declaration
    protected ParagraphFormat m_prFormat
    Field Value
    Type
    ParagraphFormat

    m_style

    The paragraph style

    Declaration
    protected IParagraphStyle m_style
    Field Value
    Type
    IParagraphStyle

    Properties

    CharacterFormat

    Gets character format.

    Declaration
    public CharacterFormat CharacterFormat { get; }
    Property Value
    Type
    CharacterFormat

    Item[Int32]

    Gets paragraph item by index.

    Declaration
    public IParagraphItem this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type
    IParagraphItem

    Items

    Gets Items of the paragraph.

    Declaration
    protected IParagraphItemCollection Items { get; }
    Property Value
    Type
    IParagraphItemCollection

    ItemsCount

    Gets paragraph items count.

    Declaration
    public int ItemsCount { get; }
    Property Value
    Type
    System.Int32

    ListFormat

    Gets format of the list for the paragraph.

    Declaration
    public ListFormat ListFormat { get; }
    Property Value
    Type
    ListFormat

    ParagraphFormat

    Gets paragraph format.

    Declaration
    public ParagraphFormat ParagraphFormat { get; }
    Property Value
    Type
    ParagraphFormat

    StyleName

    Gets paragraph style name.

    Declaration
    public string StyleName { get; }
    Property Value
    Type
    System.String

    Text

    Gets / sets paragraph text.

    Declaration
    public string Text { get; set; }
    Property Value
    Type
    System.String
    Remarks

    All internal formatting will be cleared when new text is set.

    WidgetCollection

    Declaration
    protected override ICollectionBase WidgetCollection { get; }
    Property Value
    Type
    ICollectionBase
    Overrides
    WidgetContainer.WidgetCollection

    Methods

    AppendBookmarkEnd(String)

    Appends end of the bookmark with specified name into paragraph.

    Declaration
    public BookmarkEnd AppendBookmarkEnd(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type
    BookmarkEnd

    AppendBookmarkStart(String)

    Appends start of the bookmark with specified name into paragraph.

    Declaration
    public BookmarkStart AppendBookmarkStart(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type
    BookmarkStart

    AppendCanvas(SizeF)

    Append canvas to end of paragraph.

    Declaration
    public virtual ICanvas AppendCanvas(SizeF size)
    Parameters
    Type Name Description
    System.Drawing.SizeF size
    Returns
    Type
    ICanvas

    AppendField(DLSFieldType)

    Appends field to end of paragraph.

    Declaration
    public IField AppendField(DLSFieldType type)
    Parameters
    Type Name Description
    DLSFieldType type
    Returns
    Type
    IField

    AppendParagraphItem(ParagraphItemType)

    Appends paragraph item to the end of paragraph.

    Declaration
    protected virtual IParagraphItem AppendParagraphItem(ParagraphItemType itemType)
    Parameters
    Type Name Description
    ParagraphItemType itemType
    Returns
    Type
    IParagraphItem

    AppendPicture(Byte[])

    Declaration
    public IPicture AppendPicture(byte[] imageBytes)
    Parameters
    Type Name Description
    System.Byte[] imageBytes
    Returns
    Type
    IPicture

    AppendPicture(Image)

    Appends image to end of paragraph.

    Declaration
    public IPicture AppendPicture(Image image)
    Parameters
    Type Name Description
    System.Drawing.Image image
    Returns
    Type
    IPicture

    AppendTable()

    Append table to end of paragraph.

    Declaration
    public ITable AppendTable()
    Returns
    Type
    ITable

    AppendText(String)

    Appends text to end of document.

    Declaration
    public ITextRange AppendText(string text)
    Parameters
    Type Name Description
    System.String text
    Returns
    Type
    ITextRange

    AppendTextBox(Single, Single)

    Append Textbox to the end of the paragraph

    Declaration
    public ITextBox AppendTextBox(float width, float height)
    Parameters
    Type Name Description
    System.Single width
    System.Single height
    Returns
    Type
    ITextBox

    ApplyBaseStyleFormats()

    Declaration
    protected void ApplyBaseStyleFormats()

    ApplyStyle(String)

    Applies the specified style.

    Declaration
    public void ApplyStyle(string styleName)
    Parameters
    Type Name Description
    System.String styleName

    Style name

    Remarks

    Specified style must exist in Document.Styles collection

    Clone(IDocument)

    Clones self.

    Declaration
    public IParagraph Clone(IDocument doc)
    Parameters
    Type Name Description
    IDocument doc
    Returns
    Type
    IParagraph

    CloneImpl(IDocument)

    Clone method implementation.

    Declaration
    protected virtual IParagraph CloneImpl(IDocument doc)
    Parameters
    Type Name Description
    IDocument doc
    Returns
    Type
    IParagraph

    CloneParaLstOverrideStyles(IDocument, IDocument)

    Clones the paragraph's list override styles.

    Declaration
    protected virtual void CloneParaLstOverrideStyles(IDocument sourceDocument, IDocument destDocument)
    Parameters
    Type Name Description
    IDocument sourceDocument
    IDocument destDocument

    CreateLayoutInfo()

    Declaration
    protected override void CreateLayoutInfo()
    Overrides
    WidgetBase.CreateLayoutInfo()

    Find(String, Boolean, Boolean)

    Returns first entry of given string, taking into consideration caseSensitive and wholeWord options.

    Declaration
    public TextRangesHolder Find(string given, bool caseSensitive, bool wholeWord)
    Parameters
    Type Name Description
    System.String given
    System.Boolean caseSensitive
    System.Boolean wholeWord
    Returns
    Type
    TextRangesHolder

    Find(Regex)

    Returns first entry of given regex.

    Declaration
    public TextRangesHolder Find(Regex pattern)
    Parameters
    Type Name Description
    System.Text.RegularExpressions.Regex pattern
    Returns
    Type
    TextRangesHolder

    GetStyle()

    Gets related style.

    Declaration
    public IParagraphStyle GetStyle()
    Returns
    Type
    IParagraphStyle

    GetText(Int32, Int32)

    Declaration
    protected string GetText(int startIndex, int length)
    Parameters
    Type Name Description
    System.Int32 startIndex
    System.Int32 length
    Returns
    Type
    System.String

    IndexOfItem(IParagraphItem)

    Gets index of specified paragraph item.

    Declaration
    public int IndexOfItem(IParagraphItem item)
    Parameters
    Type Name Description
    IParagraphItem item
    Returns
    Type
    System.Int32

    InitXDLSHolder()

    Registers paragraph elements for xml serialization

    Declaration
    protected override void InitXDLSHolder()
    Overrides
    XDLSSerializableBase.InitXDLSHolder()

    InsertItem(Int32, IParagraphItem)

    Inserts paragraph item to specified position.

    Declaration
    public void InsertItem(int index, IParagraphItem pItem)
    Parameters
    Type Name Description
    System.Int32 index
    IParagraphItem pItem

    RemoveItem(IParagraphItem)

    Removes specified paragraph item.

    Declaration
    public void RemoveItem(IParagraphItem item)
    Parameters
    Type Name Description
    IParagraphItem item

    RemoveItemAt(Int32)

    Removes paragraph item at specified position.

    Declaration
    public void RemoveItemAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Replace(String, TextRangesHolder, Boolean, Boolean)

    Replaces all entries of given string with TextRangesHolder, taking into consideration caseSensitive and wholeWord options.

    Declaration
    public void Replace(string given, TextRangesHolder rangesHolder, bool caseSensitive, bool wholeWord)
    Parameters
    Type Name Description
    System.String given
    TextRangesHolder rangesHolder
    System.Boolean caseSensitive
    System.Boolean wholeWord

    Replace(String, String, Boolean, Boolean)

    Replaces all entries of given string with replace string, taking into consideration caseSensitive and wholeWord options.

    Declaration
    public int Replace(string given, string replace, bool caseSensitive, bool wholeWord)
    Parameters
    Type Name Description
    System.String given
    System.String replace
    System.Boolean caseSensitive
    System.Boolean wholeWord
    Returns
    Type
    System.Int32

    Replace(Regex, TextRangesHolder)

    Replaces all entries of given regular expression with TextRangesHolder.

    Declaration
    public void Replace(Regex pattern, TextRangesHolder rangesHolder)
    Parameters
    Type Name Description
    System.Text.RegularExpressions.Regex pattern
    TextRangesHolder rangesHolder

    Replace(Regex, String)

    Replaces all entries of given regular expression with replace string.

    Declaration
    public int Replace(Regex pattern, string replace)
    Parameters
    Type Name Description
    System.Text.RegularExpressions.Regex pattern
    System.String replace
    Returns
    Type
    System.Int32

    ReplaceWithoutCorrection(Int32, Int32, String)

    Replaces the substring.

    Declaration
    protected void ReplaceWithoutCorrection(int start, int length, string replacement)
    Parameters
    Type Name Description
    System.Int32 start

    The start.

    System.Int32 length

    The length.

    System.String replacement

    The replacement.

    RestoreReference(String, Int32)

    Restores object references after deserialization

    Declaration
    protected override void RestoreReference(string name, int index)
    Parameters
    Type Name Description
    System.String name
    System.Int32 index
    Overrides
    XDLSSerializableBase.RestoreReference(String, Int32)

    UpdatePrevTextRange(ITextRange, Int32)

    Declaration
    public void UpdatePrevTextRange(ITextRange textRange, int index)
    Parameters
    Type Name Description
    ITextRange textRange
    System.Int32 index

    UpdateText(ParagraphItem, Int32, String)

    Declaration
    protected void UpdateText(ParagraphItem pItem, int length, string newText)
    Parameters
    Type Name Description
    ParagraphItem pItem
    System.Int32 length
    System.String newText

    Explicit Interface Implementations

    IWidget.Draw(CustomGraphics, LayoutedWidget)

    Declaration
    void IWidget.Draw(CustomGraphics cg, LayoutedWidget ltWidget)
    Parameters
    Type Name Description
    CustomGraphics cg
    LayoutedWidget ltWidget

    Implements

    IXDLSSerializable
    IWidgetContainer
    IWidget
    IParagraph
    IEntityBase
    IStyleHolder
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved