StringFormat StringFormat StringFormat StringFormat Class

Definition

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 ref class StringFormat sealed : MarshalByRefObject, ICloneable, IDisposable
public sealed class StringFormat : MarshalByRefObject, ICloneable, IDisposable
type StringFormat = class
    inherit MarshalByRefObject
    interface ICloneable
    interface IDisposable
Public NotInheritable Class StringFormat
Inherits MarshalByRefObject
Implements ICloneable, IDisposable
Inheritance
Implements

Remarks

Many common formats are provided through the StringFormatFlags enumeration. StringFormat objects can be changed.

Constructors

StringFormat() StringFormat() StringFormat() StringFormat()

Initializes a new StringFormat object.

StringFormat(StringFormat) StringFormat(StringFormat) StringFormat(StringFormat) StringFormat(StringFormat)

Initializes a new StringFormat object from the specified existing StringFormat object.

StringFormat(StringFormatFlags) StringFormat(StringFormatFlags) StringFormat(StringFormatFlags) StringFormat(StringFormatFlags)

Initializes a new StringFormat object with the specified StringFormatFlags enumeration.

StringFormat(StringFormatFlags, Int32) StringFormat(StringFormatFlags, Int32) StringFormat(StringFormatFlags, Int32) StringFormat(StringFormatFlags, Int32)

Initializes a new StringFormat object with the specified StringFormatFlags enumeration and language.

Properties

Alignment Alignment Alignment Alignment

Gets or sets horizontal alignment of the string.

DigitSubstitutionLanguage DigitSubstitutionLanguage DigitSubstitutionLanguage DigitSubstitutionLanguage

Gets the language that is used when local digits are substituted for western digits.

DigitSubstitutionMethod DigitSubstitutionMethod DigitSubstitutionMethod DigitSubstitutionMethod

Gets the method to be used for digit substitution.

FormatFlags FormatFlags FormatFlags FormatFlags

Gets or sets a StringFormatFlags enumeration that contains formatting information.

GenericDefault GenericDefault GenericDefault GenericDefault

Gets a generic default StringFormat object.

GenericTypographic GenericTypographic GenericTypographic GenericTypographic

Gets a generic typographic StringFormat object.

HotkeyPrefix HotkeyPrefix HotkeyPrefix HotkeyPrefix

Gets or sets the HotkeyPrefix object for this StringFormat object.

LineAlignment LineAlignment LineAlignment LineAlignment

Gets or sets the vertical alignment of the string.

Trimming Trimming Trimming Trimming

Gets or sets the StringTrimming enumeration for this StringFormat object.

Methods

Clone() Clone() Clone() Clone()

Creates an exact copy of this StringFormat object.

CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type) 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() Dispose() Dispose() Dispose()

Releases all resources used by this StringFormat object.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize() Finalize() Finalize() Finalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetLifetimeService() GetLifetimeService() GetLifetimeService() GetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetTabStops(Single) GetTabStops(Single) GetTabStops(Single) GetTabStops(Single)

Gets the tab stops for this StringFormat object.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
SetDigitSubstitution(Int32, StringDigitSubstitute) SetDigitSubstitution(Int32, StringDigitSubstitute) SetDigitSubstitution(Int32, StringDigitSubstitute) SetDigitSubstitution(Int32, StringDigitSubstitute)

Specifies the language and method to be used when local digits are substituted for western digits.

SetMeasurableCharacterRanges(CharacterRange[]) SetMeasurableCharacterRanges(CharacterRange[]) SetMeasurableCharacterRanges(CharacterRange[]) SetMeasurableCharacterRanges(CharacterRange[])

Specifies an array of CharacterRange structures that represent the ranges of characters measured by a call to the MeasureCharacterRanges(String, Font, RectangleF, StringFormat) method.

SetTabStops(Single, Single[]) SetTabStops(Single, Single[]) SetTabStops(Single, Single[]) SetTabStops(Single, Single[])

Sets tab stops for this StringFormat object.

ToString() ToString() ToString() ToString()

Converts this StringFormat object to a human-readable string.

Applies to

See Also