RichTextUnit
Represents a unit of measurement.
Definition
Namespace:Telerik.Maui.Controls.RichTextEditor
Assembly:Telerik.Maui.Controls.dll
Syntax:
[TypeConverter(typeof(RichTextUnitTypeConverter))]
public struct RichTextUnit : IComparable<RichTextUnit>, IEquatable<RichTextUnit>
Implements:
Constructors
Initializes a new instance of the RichTextUnit with the specified value and type.
public RichTextUnit(double value, RichTextUnitType type)
Specifies the value of the measurement unit.
typeRichTextUnitTypeSpecifies the type of the measurement unit.
Initializes a new instance of the RichTextUnit with the specified value in pixels.
public RichTextUnit(double value)
Specifies the value of the measurement unit in pixels.
Properties
Gets the type of the measurement unit type.
public readonly RichTextUnitType Type { get; }
Methods
Compares the current RichTextUnit with the specified one.
public int CompareTo(RichTextUnit unit)
Specifies the RichTextUnit to compare to.
Returns:0 - if the current RichTextUnit is equal to the specified one; 1 - if the current RichTextUnit is greater than the specified one; -1 - if the current RichTextUnit is less than the specified one;
Implements:
Determines if the current RichTextUnit is equal to the specified object.
Determines if the current RichTextUnit is equal to the specified one.
public bool Equals(RichTextUnit unit)
Specifies the RichTextUnit to compare to.
Returns:True - if the current RichTextUnit is equal to the specified one, False - otherwise.
Implements:
Computes the hash code of the current RichTextUnit.
public override int GetHashCode()
The computed hash code of the current RichTextUnit.
Overrides:
Parses the specified string to a RichTextUnit.
public static RichTextUnit Parse(string text)
Specifies the string to parse to.
Returns:The parsed RichTextUnit.
Exceptions:If the specified string is not in a valid format.
Converts the current RichTextUnit to its string representation.
public override string ToString()
The string representation of the current RichTextUnit.
Overrides:
Converts the current RichTextUnit to the specified type.
public RichTextUnit ToUnit(RichTextUnitType type)
Specifies the RichTextUnitType to convert to.
Returns:The new RichTextUnit with the specified RichTextUnitType.
Attempts to parse the specified string to a RichTextUnit.
public static bool TryParse(string text, out RichTextUnit unit)
Specifies the string to parse to.
unitRichTextUnitOutputs the parsed RichTextUnit.
Returns:True - if the parse operation is successful, False - otherwise.
Operators
Converts the specified RichTextUnit to pixels.
public static explicit operator double(RichTextUnit unit)
Specifies the RichTextUnit to convert to.
Returns:Converts the specified value in pixels to RichTextUnit.
public static implicit operator RichTextUnit(double value)
Specifies the value in pixels to convert to.
Returns:Converts the specified string to a RichTextUnit.
public static implicit operator RichTextUnit(string text)
Specifies the string to convert to.
Returns:Compares the two operands for inequality.
public static bool operator !=(RichTextUnit left, RichTextUnit right)
Specifies the left operand of the comparison.
rightRichTextUnitSpecifies the right operand of the comparison.
Returns:True - if the two operands are not equal, False - otherwise.
Determines if the left operand is less than the right operand.
public static bool operator <(RichTextUnit left, RichTextUnit right)
Specifies the left operand of the comparison.
rightRichTextUnitSpecifies the right operand of the comparison.
Returns:True - if the left operand is less than the right operand, False - otherwise.
Determines if the left operand is less or equal the right operand.
public static bool operator <=(RichTextUnit left, RichTextUnit right)
Specifies the left operand of the comparison.
rightRichTextUnitSpecifies the right operand of the comparison.
Returns:True - if the left operand is less or equal the right operand, False - otherwise.
Compares the two operands for equality.
public static bool operator ==(RichTextUnit left, RichTextUnit right)
Specifies the left operand of the comparison.
rightRichTextUnitSpecifies the right operand of the comparison.
Returns:True - if the two operands are equal, False - otherwise.
Determines if the left operand is greater than the right operand.
public static bool operator >(RichTextUnit left, RichTextUnit right)
Specifies the left operand of the comparison.
rightRichTextUnitSpecifies the right operand of the comparison.
Returns:True - if the left operand is greater than the right operand, False - otherwise.
Determines if the left operand is greater or equal the right operand.
public static bool operator >=(RichTextUnit left, RichTextUnit right)
Specifies the left operand of the comparison.
rightRichTextUnitSpecifies the right operand of the comparison.
Returns:True - if the left operand is greater or equal the right operand, False - otherwise.