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

    Show / Hide Table of Contents

    TabStopCollection Class

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

    Represents a set of TabStops.

    • C#
    • VB.NET
    public sealed class TabStopCollection : IList<TabStop>, ICollection<TabStop>, IEnumerable<TabStop>, IEnumerable
    Public NotInheritable Class TabStopCollection
        Implements IList(Of TabStop), ICollection(Of TabStop), IEnumerable(Of TabStop), IEnumerable
    Inheritance:
    System.Object
    TabStopCollection
    Implements
    System.Collections.Generic.IList<TabStop>
    System.Collections.Generic.ICollection<TabStop>
    System.Collections.Generic.IEnumerable<TabStop>
    System.Collections.IEnumerable
    Remarks

    Creating customized tabs in a document is accomplished with TabStop structure that enables you to define tab position, tab leader character and surrounding text alignment.

    TabStops should be inserted into Tabs collection to be used in a Paragraph.

    Tabs are inserted into a document content with SpecialCharacter elements that have CharacterType property equal to Tab.

    Values Bar and List are currently not supported in PDF, XPS and image file formats.

    Properties

    Count

    Gets the number of TabStops contained in the TabStopCollection.

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

    The number of TabStops contained in the TabStopCollection.

    Item[Int32]

    Gets or sets the TabStop at the specified index.

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

    The zero-based index of the TabStop to get or set.

    Property Value
    TabStop

    The TabStop at the specified index.

    Methods

    Add(TabStop)

    Adds an object to the end of the TabStopCollection.

    • C#
    • VB.NET
    public void Add(TabStop item)
    Public Sub Add(item As TabStop)
    Parameters
    item
    TabStop

    The object to be added to the end of the TabStopCollection.

    Clear()

    Removes all elements from the TabStopCollection.

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

    Contains(TabStop)

    Determines whether an element is in the TabStopCollection.

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

    The element to locate in the TabStopCollection.

    Returns
    System.Boolean

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

    CopyTo(TabStop[], Int32)

    Copies the entire TabStopCollection to a compatible one-dimensional array, starting at the specified index of the target array.

    • C#
    • VB.NET
    public void CopyTo(TabStop[] array, int arrayIndex)
    Public Sub CopyTo(array As TabStop(), arrayIndex As Integer)
    Parameters
    array
    TabStop[]

    The one-dimensional array that is the destination of the elements copied from TabStopCollection.

    arrayIndex
    System.Int32

    The zero-based index in array at which copying begins.

    Equals(Object)

    Determines whether the specified System.Object is equal to this TabStopCollection instance.

    • C#
    • VB.NET
    public override bool Equals(object obj)
    Public Overrides Function Equals(obj As Object) As Boolean
    Parameters
    obj
    System.Object

    The System.Object to compare with this tab stop collection instance.

    Returns
    System.Boolean

    true if the specified System.Object is a TabStopCollection and is equal to this TabStopCollection instance; otherwise, false.

    Overrides
    System.Object.Equals(System.Object)

    GetEnumerator()

    Returns an enumerator that iterates through the TabStopCollection.

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

    An enumerator for the TabStopCollection.

    GetHashCode()

    Returns a hash code for this TabStopCollection instance.

    • C#
    • VB.NET
    public override int GetHashCode()
    Public Overrides Function GetHashCode As Integer
    Returns
    System.Int32

    An integer value that specifies a hash value for this TabStopCollection instance.

    Overrides
    System.Object.GetHashCode()

    IndexOf(TabStop)

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

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

    The element to locate in the TabStopCollection.

    Returns
    System.Int32

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

    Insert(Int32, TabStop)

    Inserts an element into the TabStopCollection at the specified index.

    • C#
    • VB.NET
    public void Insert(int index, TabStop item)
    Public Sub Insert(index As Integer, item As TabStop)
    Parameters
    index
    System.Int32

    The zero-based index at which item should be inserted.

    item
    TabStop

    The element to insert.

    Remove(TabStop)

    Removes the first occurrence of a specific element from the TabStopCollection.

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

    The element from the TabStopCollection.

    Returns
    System.Boolean

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

    RemoveAt(Int32)

    Removes the element at the specified index of the TabStopCollection.

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

    The zero-based index of the element to remove.

    Operators

    Equality(TabStopCollection, TabStopCollection)

    Determines whether first and second TabStopCollections are equal.

    • C#
    • VB.NET
    public static bool operator ==(TabStopCollection first, TabStopCollection second)
    Public Shared Operator =(first As TabStopCollection, second As TabStopCollection) As Boolean
    Parameters
    first
    TabStopCollection

    The first tab stop collection.

    second
    TabStopCollection

    The second tab stop collection.

    Returns
    System.Boolean

    true if first and second tab stop collections are equal; otherwise, false.

    Inequality(TabStopCollection, TabStopCollection)

    Determines whether first and second TabStopCollections are not equal.

    • C#
    • VB.NET
    public static bool operator !=(TabStopCollection first, TabStopCollection second)
    Public Shared Operator <>(first As TabStopCollection, second As TabStopCollection) As Boolean
    Parameters
    first
    TabStopCollection

    The first tab stop collection.

    second
    TabStopCollection

    The second tab stop collection.

    Returns
    System.Boolean

    true if first and second tab stop collections are not equal; otherwise, false.

    Implements

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

    See Also

    Tabs
    TabStop
    SpecialCharacter
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.