[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.TabStopCollection

Class TabStopCollection

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

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
Inheritance
object
TabStopCollection
Implements
System.Collections.Generic.IReadOnlyList<T><TabStop>
System.Collections.Generic.IReadOnlyCollection<T><TabStop>
System.Collections.Generic.IEnumerable<T><TabStop>
System.Collections.IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

BaseKey

Gets the base (this class) key for formatting properties.

protected override string BaseKey { get; }

Property Value

string

Count

Gets the number of tab stops in the collection.

public int Count { get; }

Property Value

int

this[int]

Gets a tab stop at the given index.

public TabStop this[int index] { get; }

Parameters

index int

Property Value

TabStop

An index into the collection of tab stops.

this[float]

Gets a tab stop at a specified position.

public TabStop this[float position] { get; }

Parameters

position float

The position (in points) of the tab stop.

Property Value

TabStop

Returns the tab stop at the specified position.

Methods

Add(float, TabStopAlignment, TabStopLeader)

Adds or replaces a tab stop at a specified position.

public TabStop Add(float position, TabStopAlignment alignment, TabStopLeader leader)

Parameters

position float

The position (in points) where to add the tab stop.

alignment TabStopAlignment

A TabStopAlignment value that specifies the alignment of text at the tab stop.

leader TabStopLeader

A TabStopLeader value that specifies the type of the leader line displayed under the tab character.

Returns

TabStop

A new tab stop object specified on the position.

Add(float, TabStopAlignment)

Adds or replaces a tab stop at a specified position.

public TabStop Add(float position, TabStopAlignment alignment)

Parameters

position float

The position (in points) where to add the tab stop.

alignment TabStopAlignment

A TabStopAlignment value that specifies the alignment of text at the tab stop.

Returns

TabStop

The new tab stop object added at the specified position.

Add(float)

Adds or replaces a tab stop at a specified position.

public TabStop Add(float position)

Parameters

position float

The position (in points) where to add the tab stop.

Returns

TabStop

The new tab stop object added at the specified position.

After(float)

Gets the first tab stop to the right of a specified position.

public TabStop After(float position)

Parameters

position float

The tab stop position (in points).

Returns

TabStop

The tab stop object, or null if a suitable tab stop was not found.

Before(float)

Gets a first tab stop to the left of a specified position.

public TabStop Before(float position)

Parameters

position float

The tab stop position (in points).

Returns

TabStop

The tab stop object, or null if a suitable tab stop was not found.

Clear()

Deletes all custom tab stops.

public void Clear()

Remarks

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.

Contains(float)

Checks whether the collection contains a tab stop at a specified position.

public bool Contains(float position)

Parameters

position float

The tab stop position to find.

Returns

bool

True if the collection contains a tab stop at the specified position, false otherwise.

Delete(TabStop)

Deletes a TabStop from the collection.

public void Delete(TabStop tabStop)

Parameters

tabStop TabStop

The TabStop to delete.

Remarks

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.

GetEnumerator()

Gets an enumerator that iterates through the tab stops.

public IEnumerator<TabStop> GetEnumerator()

Returns

System.Collections.Generic.IEnumerator<T><TabStop>

Returns an enumerator that iterates through the tab stops.

TryGetValue(float, out TabStop)

Gets a tab stop at a specified position.

public bool TryGetValue(float position, out TabStop tabStop)

Parameters

position float

The position (in points) of the tab stop.

tabStop TabStop

When this method returns, contains the tab stop at the specified position if the tab stop was found, otherwise contains null.

Returns

bool

True if the tab stop at the specified position is found, false otherwise.