TextTabStop Struct

A tabulation stop of a line: where the text after a tabulation goes, and how it is aligned there.

public readonly struct TextTabStop : IEquatable<TextTabStop>

Remarks

The position is measured from where the text of the line starts (after the indent of the line, as the stops of TextLayoutOptions.TabSize are), along the line: from the left of a left-to-right paragraph, from the right of a right-to-left one, and from the top of a vertical line.

See also

Implements

Constructors

NameDescription
TextTabStop(double, TextTabAlignment, char)Initializes a tabulation stop.

TextTabStop(double, TextTabAlignment, char)

TextTabStop.cs

Initializes a tabulation stop.

public TextTabStop(double position, TextTabAlignment alignment = TextTabAlignment.Start, char decimalSeparator = '.')

Parameters

position double
The distance of the stop from the start of the text of the line, in pixels: a positive number up to 1048576.
alignment TextTabAlignment
How the text after the tabulation is placed at the stop.
decimalSeparator char
The character a TextTabAlignment.DecimalSeparator stop aligns: the period by default.

Exceptions

ArgumentOutOfRangeException
position is not a positive number up to 1048576, or alignment is not a member of TextTabAlignment.

Properties

NameDescription
AlignmentGets how the text after the tabulation is placed at the stop.
DecimalSeparatorGets the character a TextTabAlignment.DecimalSeparator stop aligns.
PositionGets the distance of the stop from the start of the text of the line, in pixels.

Gets how the text after the tabulation is placed at the stop.

public TextTabAlignment Alignment { get; }

Property value

TextTabAlignment

DecimalSeparator

TextTabStop.cs

Gets the character a TextTabAlignment.DecimalSeparator stop aligns.

public char DecimalSeparator { get; }

Property value

char

Gets the distance of the stop from the start of the text of the line, in pixels.

public double Position { get; }

Property value

double

Methods

NameDescription
Equals(TextTabStop)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
GetHashCode()Returns the hash code for this instance.
ToString()Returns the stop in the form 120 End.

Equals overloads

Equals(TextTabStop)

TextTabStop.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(TextTabStop other)
Parameters
other TextTabStop
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

TextTabStop.cs

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

TextTabStop.cs

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

ToString()

TextTabStop.cs

Returns the stop in the form 120 End.

public override string ToString()

Returns

string

Operators

NameDescription
operator ==(TextTabStop, TextTabStop)Determines whether two tabulation stops are the same.
operator !=(TextTabStop, TextTabStop)Determines whether two tabulation stops differ.

operator ==(TextTabStop, TextTabStop)

TextTabStop.cs

Determines whether two tabulation stops are the same.

public static bool operator ==(TextTabStop left, TextTabStop right)

Parameters

left TextTabStop
right TextTabStop

Returns

bool

operator !=(TextTabStop, TextTabStop)

TextTabStop.cs

Determines whether two tabulation stops differ.

public static bool operator !=(TextTabStop left, TextTabStop right)

Parameters

left TextTabStop
right TextTabStop

Returns

bool