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 : IDisposable

Constructors

NameDescription
StringFormat()Initializes a new instance of the StringFormat class.
StringFormat(StringFormat)Initializes a new instance of the StringFormat class from the specified existing StringFormat object.
StringFormat(StringFormatFlags)Initializes a new instance of the StringFormat class with the specified StringFormatFlags enumeration.
StringFormat(StringFormatFlags, int)Initializes a new instance of the StringFormat class 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.
DigitSubstitutionLanguage { get; }Gets the language that is used when local digits are substituted for western digits.
DigitSubstitutionMethod { get; }Gets the method to be used for digit substitution.
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.
Trimming { get; set; }Gets or sets the StringTrimming enumeration for this StringFormat object.

Methods

NameDescription
Clone()Creates an exact copy of this StringFormat object.
Dispose()Releases all resources used by this StringFormat object.
GetTabStops(out float)Gets the tab stops for this StringFormat object.
SetDigitSubstitution(int, StringDigitSubstitute)Specifies the language and method to be used when local digits are substituted for western digits.
SetMeasurableCharacterRanges(CharacterRange[])Specifies an array of CharacterRange structures that represent the ranges of characters measured by a call to the MeasureCharacterRanges method.
SetTabStops(float, float[])Sets tab stops for this StringFormat object.

See Also