Class StringFormat

StringFormat class

Encapsulates text layout information (such as alignment, orientation and tab stops) display manipulations (such as ellipsis insertion and national digit substitution) and OpenType features. This class cannot be inherited.

public sealed class StringFormat : DisposableObject

Constructors

NameDescription
StringFormat()Initializes a new StringFormat object.
StringFormat(StringFormat)Initializes a new StringFormat object from the specified existing StringFormat object.
StringFormat(StringFormatFlags)Initializes a new StringFormat object with the specified StringFormatFlags enumeration and language.

Properties

NameDescription
static GenericDefault { get; }Gets a generic default StringFormat object.
static GenericTypographic { get; }Gets a generic typographic StringFormat object.
Alignment { get; set; }Gets or sets text alignment information on the vertical plane.
CustomCharIdent { get; set; }Gets or sets the custom character ident.
DigitSubstitutionLanguage { get; set; }Gets or sets the language that is used when local digits are substituted for western digits.
DigitSubstitutionMethod { get; set; }Gets or sets the method to be used for digit substitution.
Disposed { get; }Gets a value indicating whether this instance is disposed.
FirstTabOffset { get; }Gets the number of spaces between the beginning of a line of text and the first tab stop.
FormatFlags { get; set; }Gets or sets a StringFormatFlags enumeration that contains formatting information.
HotkeyPrefix { get; set; }Gets or sets the HotkeyPrefix object for this StringFormat object.
LineAlignment { get; set; }Gets or sets the line alignment on the horizontal plane.
TabStops { get; }Gets an array of distances between tab stops in the units specified by the PageUnit property.
Trimming { get; set; }Gets or sets the StringTrimming enumeration for this StringFormat object.

Methods

NameDescription
DeepClone()Creates a deep clone of this StringFormat object.
Dispose()Disposes the current instance.
override Equals(object)Check if objects are equal.
override GetHashCode()Get hash code of the current object.
SetTabStops(float, float[])Sets tab stops for this StringFormat object.
override ToString()Converts this StringFormat object to a human-readable string.

See Also