GemBox.Document
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    Block Class

    Namespace:
    GemBox.Document
    Assembly:
    GemBox.Document.dll

    Represents a base class for all block elements - Paragraph, Table and TableOfEntries.

    • C#
    • VB.NET
    public abstract class Block : Element
    Public MustInherit Class Block
        Inherits Element
    Inheritance:
    System.Object
    Element
    Block
    Derived
    BlockContentControl
    Paragraph
    TableOfEntries
    Table
    Remarks

    Block elements take the entire width of a document. No other document element can be contained in the same line with a block element.

    Block elements, especially Paragraphs, are starting building blocks for Section, HeaderFooter, TableCell and TableOfEntries content.

    For more information, see GemBox.Document Content Model.

    Properties

    ParentCollection

    Gets the BlockCollection that contains this Block instance.

    • C#
    • VB.NET
    public BlockCollection ParentCollection { get; }
    Public ReadOnly Property ParentCollection As BlockCollection
    Property Value
    BlockCollection

    The BlockCollection that contains this Block instance.

    Methods

    Clone(Boolean)

    Clones this Block instance.

    • C#
    • VB.NET
    public Block Clone(bool cloneDescendants)
    Public Function Clone(cloneDescendants As Boolean) As Block
    Parameters
    cloneDescendants
    System.Boolean

    If set to true clones all descendants recursively; otherwise clones only current Block.

    Returns
    Block

    Cloned Block.

    Remarks

    Document content element instance can exist only in a one place in the document.

    If you want to insert document content element into some other part of the same document, then clone the element and insert its clone.

    If you want to insert document content element into another document, then you should first import it into another document with Import<T>(T, Boolean, Boolean) method and then insert the imported element.

    For more information, see cloning example.

    Inherited Properties

    Content

    Gets the content of the current Element.

    (Inherited from Element)

    Document

    Gets the owner document.

    (Inherited from Element)

    ElementType

    Gets the ElementType of this Element instance.

    (Inherited from Element)

    Parent

    Gets the parent of this Element instance.

    (Inherited from Element)

    Inherited Methods

    GetChildElements(System.Boolean)

    Gets the child elements.

    (Inherited from Element)

    GetChildElements(System.Boolean, ElementType[])

    Gets the child elements filtered by ElementType.

    (Inherited from Element)

    GetParentElements()

    Gets the parent elements.

    (Inherited from Element)

    GetParentElements(ElementType[])

    Gets the parent elements.

    (Inherited from Element)

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.