TabStopCollection Class
Represents a collection of custom tab stops that are to be used within a TextParagraph.
This collection is sorted based on Position property.
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:
- TabStopCollection
Properties
Count
Gets the number of TabStops contained in the collection.
Property Value
DefaultSize
Gets or sets the default size for a tab character within this TextParagraph.
Default value is 2.54 cm (1 inch).
Property Value
The default size for a tab character within this TextParagraph.
Item[Int32]
Gets the TabStop at the specified index.
public TabStop this[int index] { get; }
Public ReadOnly Property Item(index As Integer) As TabStop
Parameters
Property Value
Exceptions
index
is less than zero or index
is equal to or greater than Count.
Methods
Clear()
Removes all TabStops from the collection.
Contains(TabStop)
Determines whether a TabStop is in the collection.
Parameters
Returns
true if item
is found in the collection; otherwise, false.
Exceptions
item
is null.
GetEnumerator()
Returns an enumerator that iterates through the TabStopCollection.
public IEnumerator<TabStop> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of TabStop)
Returns
An 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.
Parameters
Returns
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.
Parameters
position
- Length
The position of the tab stop to remove.
Returns
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.
Parameters
Returns
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.
Parameters
Exceptions
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.
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
A TabStop instance that was set to TabStopCollection.
Exceptions
position
is less than zero.