This documentation is archived and is not being maintained.
StringFormat Class
Visual Studio 2010
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)
The StringFormat type exposes the following members.
| 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 | 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. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | GetTabStops | Gets the tab stops for this StringFormat object. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) |
![]() | SetDigitSubstitution | Specifies the language and method to be used when local digits are substituted for western digits. |
![]() | SetMeasurableCharacterRanges | Specifies an array of CharacterRange structures that represent the ranges of characters measured by a call to the MeasureCharacterRanges method. |
![]() | SetTabStops | 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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
