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

    Show / Hide Table of Contents

    TextParagraphCollection Class

    Namespace:
    GemBox.Spreadsheet.Drawing
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a collection of TextParagraphs.

    • C#
    • VB.NET
    public class TextParagraphCollection : IEnumerable<TextParagraph>, IEnumerable
    Public Class TextParagraphCollection
        Implements IEnumerable(Of TextParagraph), IEnumerable
    Inheritance:
    System.Object
    TextParagraphCollection
    Implements
    System.Collections.Generic.IEnumerable<TextParagraph>
    System.Collections.IEnumerable

    Properties

    Count

    Gets the number of TextParagraphs contained in the collection.

    • C#
    • VB.NET
    public int Count { get; }
    Public ReadOnly Property Count As Integer
    Property Value
    System.Int32

    The number of TextParagraphs contained in the collection.

    Item[Int32]

    Gets the TextParagraph at the specified index.

    • C#
    • VB.NET
    public TextParagraph this[int index] { get; }
    Public ReadOnly Property Item(index As Integer) As TextParagraph
    Parameters
    index
    System.Int32
    Property Value
    TextParagraph

    The TextParagraph at the specified index.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than zero or index is equal to or greater than Count.

    Methods

    Add()

    Adds a new paragraph to the text box.

    • C#
    • VB.NET
    public TextParagraph Add()
    Public Function Add As TextParagraph
    Returns
    TextParagraph

    The paragraph added to the text box.

    Clear()

    Removes all TextParagraphs from the collection.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    Contains(TextParagraph)

    Determines whether a TextParagraph is in the collection.

    • C#
    • VB.NET
    public bool Contains(TextParagraph item)
    Public Function Contains(item As TextParagraph) As Boolean
    Parameters
    item
    TextParagraph

    The TextParagraph to locate in the collection.

    Returns
    System.Boolean

    true if item is found in the collection; otherwise, false.

    Exceptions
    System.ArgumentNullException

    item is null.

    GetEnumerator()

    Returns an enumerator that iterates through the TextParagraphCollection.

    • C#
    • VB.NET
    public IEnumerator<TextParagraph> GetEnumerator()
    Public Function GetEnumerator As IEnumerator(Of TextParagraph)
    Returns
    System.Collections.Generic.IEnumerator<TextParagraph>

    An System.Collections.Generic.IEnumerator<T> for the collection.

    IndexOf(TextParagraph)

    Searches for the specified TextParagraph and returns the zero-based index of the first occurrence within the entire collection.

    • C#
    • VB.NET
    public int IndexOf(TextParagraph item)
    Public Function IndexOf(item As TextParagraph) As Integer
    Parameters
    item
    TextParagraph

    The TextParagraph to locate in the collection.

    Returns
    System.Int32

    The zero-based index of the first occurrence of item within the entire collection, if found; otherwise, -1.

    Remove(TextParagraph)

    Removes the first occurrence of a specific TextParagraph from the collection.

    • C#
    • VB.NET
    public bool Remove(TextParagraph item)
    Public Function Remove(item As TextParagraph) As Boolean
    Parameters
    item
    TextParagraph

    The TextParagraph to remove from the collection.

    Returns
    System.Boolean

    true if item is successfully removed; otherwise, false. This method also returns false if item was not found in the original collection.

    RemoveAt(Int32)

    Removes the TextParagraph at the specified index of the collection.

    • C#
    • VB.NET
    public void RemoveAt(int index)
    Public Sub RemoveAt(index As Integer)
    Parameters
    index
    System.Int32

    The zero-based index of the TextParagraph to remove.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than zero or index is equal to or greater than Count.

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    See Also

    Paragraphs
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.