Class TextState

TextState class

Represents a text state of a text

public class TextState

Constructors

NameDescription
TextState()Creates text state object.
TextState(Color)Creates text state object with foreground color specification.
TextState(double)Creates text state object with font size specification.
TextState(string)Creates text state object with font family specification.
TextState(Color, double)Creates text state object with foreground color and font size specification.
TextState(string, double)Creates text state object with font family and font size specification.
TextState(string, bool, bool)Creates text state object with font family and font style specification.

Properties

NameDescription
virtual BackgroundColor { get; set; }Sets background color of the text.
virtual CharacterSpacing { get; set; }Gets or sets character spacing of the text.
virtual CoordinateOrigin { get; set; }Gets or sets text CoordinateOrigin. If CoordinateOrigin is Descender, the text Y coordinate corresponds to the font’s lowest point. If CoordinateOrigin is BaseLine, the text Y coordinate corresponds to the font’s baseline. The default value is Descender. If the font’s Descent value is too big, text can be rendered higher than other fonts. In this case, CoordinateOrigin BaseLine can be selected for better text rendering.
virtual Font { get; set; }Gets or sets font of the text.
virtual FontSize { get; set; }Gets or sets font size of the text.
virtual FontStyle { get; set; }Sets font style of the text.
virtual ForegroundColor { get; set; }Gets or sets foreground color of the text.
virtual HorizontalAlignment { get; set; }Gets or sets horizontal alignment for the text.
virtual HorizontalScaling { get; set; }Gets or sets horizontal scaling of the text.
virtual Invisible { get; set; }Gets or sets the invisibility of text. This basically reflects the RenderingMode state, except for some special cases (like clipping).
virtual LineSpacing { get; set; }Gets or sets line spacing of the text.
virtual RenderingMode { get; set; }Gets or sets rendering mode of text.
virtual StrikeOut { get; set; }Gets or sets strikeout for the text, represented by the TextSegment object
virtual StrokingColor { get; set; }Gets or sets foreground color of the text.
virtual Subscript { get; set; }Gets or sets subscript of the text.
virtual Superscript { get; set; }Gets or sets superscript of the text.
virtual Underline { get; set; }Gets or sets underline for the text, represented by the TextFragment object
virtual WordSpacing { get; set; }Gets or sets word spacing of the text.

Methods

NameDescription
virtual ApplyChangesFrom(TextState)Applies settings from another textState.
MeasureHeight(char)Measures character height.
virtual MeasureString(string)Measures the string.

Fields

NameDescription
readonly TabstopDefaultValueDefault value of tabulation in widths of space character of default font.
readonly TabTagYou can place this tag in text to declare tabulation.

See Also