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

    Show / Hide Table of Contents

    TabStopCollection Class

    Namespace:
    GemBox.Presentation
    Assembly:
    GemBox.Presentation.dll

    Represents a collection of custom tab stops that are to be used within a TextParagraph.

    This collection is sorted based on Position property.

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

    Properties

    Count

    Gets the number of TabStops contained in the collection.

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

    The number of TabStops contained in the collection.

    DefaultSize

    Gets or sets the default size for a tab character within this TextParagraph.

    Default value is 2.54 cm (1 inch).

    • C#
    • VB.NET
    public Length DefaultSize { get; set; }
    Public Property DefaultSize As Length
    Property Value
    Length

    The default size for a tab character within this TextParagraph.

    Item[Int32]

    Gets the TabStop at the specified index.

    • C#
    • VB.NET
    public TabStop this[int index] { get; }
    Public ReadOnly 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.

    Exceptions
    System.ArgumentOutOfRangeException

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

    Methods

    Clear()

    Removes all TabStops from the collection.

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

    Contains(TabStop)

    Determines whether a TabStop is in the collection.

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

    The TabStop 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 TabStopCollection.

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

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

    IndexOf(TabStop)

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

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

    The TabStop 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(Length)

    Removes the tab stop at the specified position from the TabStopCollection.

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

    The position of the tab stop to remove.

    Returns
    System.Boolean

    true if tab stop is successfully removed; otherwise, false. This method also returns false if tab stop was not found at the specified position in the TabStopCollection.

    Remove(TabStop)

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

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

    The TabStop 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 TabStop 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 TabStop to remove.

    Exceptions
    System.ArgumentOutOfRangeException

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

    Set(Length, TabStopAlignment)

    Sets the tab stop at the specified position and of the specified alignment.

    • C#
    • VB.NET
    public TabStop Set(Length position, TabStopAlignment alignment)
    Public Function Set(position As Length, alignment As TabStopAlignment) As TabStop
    Parameters
    position
    Length

    The tab stop position.

    alignment
    TabStopAlignment

    The tab stop alignment.

    Returns
    TabStop

    A TabStop instance that was set to TabStopCollection.

    Exceptions
    System.ArgumentOutOfRangeException

    position is less than zero.

    Implements

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

    See Also

    Tabs
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.