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.
Assembly: System.Drawing (in System.Drawing.dll)
| Name | Description | |
|---|---|---|
![]() | 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. |
![]() | StringFormat(StringFormatFlags, Int32) | Initializes a new StringFormat object with the specified StringFormatFlags enumeration and language. |
| Name | Description | |
|---|---|---|
![]() | Alignment | Gets or sets horizontal alignment of the string. |
![]() | DigitSubstitutionLanguage | Gets the language that is used when local digits are substituted for western digits. |
![]() | DigitSubstitutionMethod | Gets the method to be used for digit substitution. |
![]() | FormatFlags | Gets or sets a StringFormatFlags enumeration that contains formatting information. |
![]() ![]() | GenericDefault | Gets a generic default StringFormat object. |
![]() ![]() | GenericTypographic | Gets a generic typographic StringFormat object. |
![]() | HotkeyPrefix | Gets or sets the HotkeyPrefix object for this StringFormat object. |
![]() | LineAlignment | Gets or sets the vertical alignment of the string. |
![]() | Trimming | Gets or sets the StringTrimming enumeration for this StringFormat object. |
| Name | Description | |
|---|---|---|
![]() | Clone() | Creates an exact copy of this StringFormat object. |
![]() | CreateObjRef(Type^) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.) |
![]() | Dispose() | Releases all resources used by this StringFormat object. |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Overrides Object::Finalize().) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetLifetimeService() | Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.) |
![]() | GetTabStops(Single%) | Gets the tab stops for this StringFormat object. |
![]() | GetType() | |
![]() | InitializeLifetimeService() | Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.) |
![]() | SetDigitSubstitution(Int32, StringDigitSubstitute) | Specifies the language and method to be used when local digits are substituted for western digits. |
![]() | SetMeasurableCharacterRanges(array<CharacterRange>^) | Specifies an array of CharacterRange structures that represent the ranges of characters measured by a call to the MeasureCharacterRanges method. |
![]() | SetTabStops(Single, array<Single>^) | Sets tab stops for this StringFormat object. |
![]() | ToString() | Converts this StringFormat object to a human-readable string.(Overrides Object::ToString().) |
Many common formats are provided through the StringFormatFlags enumeration. StringFormat objects can be changed.
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



