TextDecorationLineType

TextDecorationLineType structure

Represents types of the text decoration line: underline (underscore), overline, and line-through (strikethrough)

public struct TextDecorationLineType : IEquatable<TextDecorationLineType>

Properties

Name Description
IsInitial { get; } Indicates whether this instance has an initial value — None
IsLineThrough { get; } Indicates whether line-through (strikethrough) is enabled
IsOverline { get; } Indicates whether overline is enabled
IsUnderline { get; } Indicates whether underline (underscore) is enabled
Value { get; } Returns a value of all flags in this instance as text

Methods

Name Description
static FromFlags(bool, bool, bool) Creates and returns a TextDecorationLineType instance with flags, defined by the specified parameters
override Equals(object) Indicates whether this TextDecorationLineType instance is equal to specified uncasted
Equals(TextDecorationLineType) Indicates whether this TextDecorationLineType instance is equal to specified
override GetHashCode() Returns a hash-code of this instance
override ToString() Returns a value of all flags in this instance as text
static TryParse(string, out TextDecorationLineType) Tries to parse a specified string and return a valid TextDecorationLineType instance
operator + Combines (merges) two specified line types and produces new resultant line type, where flags are merged (union)
operator / Returns an intersection between first and second line types, where only those flags are enabled, which are enabled simultaneously in both operands. Has the highest priority between all operators (higher than union and difference)
operator == Checks whether two “TextDecorationLineType” values are equal
explicit operator Casts specific Byte (8-bit octet) to the corresponding TextDecorationLineType, throws exception if casting is invalid (2 operators)
operator != Checks whether two “TextDecorationLineType” values are not equal
operator - Subtracts second specified line type from the first specified line type and produces new resultant line type, where are present only those flags from the first operand, which are not found in the second operand (difference)

Fields

Name Description
static readonly LineThrough Each line of text has a line through the middle.
static readonly None Produces no text decoration. Initial value.
static readonly Overline Each line of text has a line above it.
static readonly Underline Each line of text is underlined.

Remarks

Immutable struct. Similar to the https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-line

See Also