TabStopCollection Class
Represents a set of TabStops.
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.ObjectTabStopCollection
Implements
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.
Property Value
- System.Int32
The number of TabStops contained in the TabStopCollection.
Item[Int32]
Gets or sets the TabStop at the specified index.
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
Methods
Add(TabStop)
Adds an object to the end of the TabStopCollection.
Parameters
item
- TabStop
The object to be added to the end of the TabStopCollection.
Clear()
Removes all elements from the TabStopCollection.
Contains(TabStop)
Determines whether an element is in the TabStopCollection.
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.
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.
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
GetEnumerator()
Returns an enumerator that iterates through the TabStopCollection.
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.
Returns
- System.Int32
An integer value that specifies a hash value for this TabStopCollection instance.
Overrides
IndexOf(TabStop)
Searches for the specified element and returns the zero-based index of the first occurrence within the entire TabStopCollection.
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.
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.
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.
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.
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.
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.