StringFormat
System.Drawing.StringFormat
Namespace: System.Drawing
Assembly: System.Drawing.Managed (4.0.0.0)
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 class StringFormat : MarshalByRefObject, ICloneable, IDisposablePublic Class StringFormat
Inherits MarshalByRefObject
Implements ICloneable, IDisposableConstructors
StringFormat()
Initializes a new instance of the StringFormat class.
StringFormat(options)
Initializes a new instance of the StringFormat class.
StringFormat(options, language)
Initializes a new instance of the StringFormat class.
StringFormat(format)
Initializes a new instance of the StringFormat class.
Properties
Alignment
StringAlignment: Gets or sets horizontal alignment of the string.
FormatFlags
StringFormatFlags: Gets or sets a StringFormatFlags enumeration that contains formatting information.
GenericDefault
StringFormat: Gets a generic default StringFormat. A generic, default StringFormat object has the following characteristics:
No string format flags are set.
Character alignment and line alignment are set to Near.
Language ID is set to neutral language, which means that the current language associated with the calling thread is used.
Hot key prefix is set to None.
String trimming is set to Character.
GenericTypographic
StringFormat: Gets a generic typographic StringFormat. A generic, typographic StringFormat object has the following characteristics:
Format flags are set to NoClip, FitBlackBox and LineLimit.
Character alignment and line alignment are set to Near.
Language ID is set to neutral language, which means that the current language associated with the calling thread is used.
Hot key prefix is set to None.
String trimming is set to Character.
HotkeyPrefix
HotkeyPrefix: Gets or sets the HotkeyPrefix object for this StringFormat object.
LineAlignment
StringAlignment: Gets or sets the vertical alignment of the string.
Trimming
StringTrimming: Gets or sets the StringTrimming enumeration for this StringFormat object.
Methods
Clone()
Returns: Object.
Dispose()
Last updated
Was this helpful?