[]
Represents a collection of TabStop objects that define custom tabs for a paragraph or a style.
public class TabStopCollection : FormattingBag, IReadOnlyList<TabStop>, IReadOnlyCollection<TabStop>, IEnumerable<TabStop>, IEnumerable
Gets the base (this class) key for formatting properties.
protected override string BaseKey { get; }
Gets the number of tab stops in the collection.
public int Count { get; }
Gets a tab stop at the given index.
public TabStop this[int index] { get; }
index
intAn index into the collection of tab stops.
Gets a tab stop at a specified position.
public TabStop this[float position] { get; }
position
floatThe position (in points) of the tab stop.
Returns the tab stop at the specified position.
Adds or replaces a tab stop at a specified position.
public TabStop Add(float position, TabStopAlignment alignment, TabStopLeader leader)
position
floatThe position (in points) where to add the tab stop.
alignment
TabStopAlignmentA TabStopAlignment value that specifies the alignment of text at the tab stop.
leader
TabStopLeaderA TabStopLeader value that specifies the type of the leader line displayed under the tab character.
A new tab stop object specified on the position.
Adds or replaces a tab stop at a specified position.
public TabStop Add(float position, TabStopAlignment alignment)
position
floatThe position (in points) where to add the tab stop.
alignment
TabStopAlignmentA TabStopAlignment value that specifies the alignment of text at the tab stop.
The new tab stop object added at the specified position.
Adds or replaces a tab stop at a specified position.
public TabStop Add(float position)
position
floatThe position (in points) where to add the tab stop.
The new tab stop object added at the specified position.
Gets the first tab stop to the right of a specified position.
public TabStop After(float position)
position
floatThe tab stop position (in points).
The tab stop object, or null if a suitable tab stop was not found.
Gets a first tab stop to the left of a specified position.
public TabStop Before(float position)
position
floatThe tab stop position (in points).
The tab stop object, or null if a suitable tab stop was not found.
Deletes all custom tab stops.
public void Clear()
This method clears only tab stops that are not inherited from previous level of hierarchy. So after clearing some active tab stops might remains from previous level of hierarchy. To stop propagation of active tab stops at that positions just add new tab stops with Clear.
Checks whether the collection contains a tab stop at a specified position.
public bool Contains(float position)
position
floatThe tab stop position to find.
True if the collection contains a tab stop at the specified position, false otherwise.
Deletes a TabStop from the collection.
public void Delete(TabStop tabStop)
This method only allows deleting tab stops that are not inherited from a previous level of the hierarchy. So after deleting there may be another active tab stop at this position that is inherited. To stop propagation of active tab stops at this position just add a new tab stop with Clear.
Gets an enumerator that iterates through the tab stops.
public IEnumerator<TabStop> GetEnumerator()
Returns an enumerator that iterates through the tab stops.
Gets a tab stop at a specified position.
public bool TryGetValue(float position, out TabStop tabStop)
position
floatThe position (in points) of the tab stop.
tabStop
TabStopWhen this method returns, contains the tab stop at the specified position if the tab stop was found, otherwise contains null.
True if the tab stop at the specified position is found, false otherwise.