Class RichTextUnit
Represents a unit of measurement.
Inheritance
Namespace: Telerik.Maui.Controls.RichTextEditor
Assembly: Telerik.Maui.Controls.dll
Syntax
public sealed class RichTextUnit : ValueType, IComparable<RichTextUnit>, IEquatable<RichTextUnit>
Constructors
RichTextUnit(Double)
Initializes a new instance of the Rich
Declaration
public RichTextUnit(double value)
Parameters
System. Specifies the value of the measurement unit in pixels. |
RichTextUnit(Double, RichTextUnitType)
Initializes a new instance of the Rich
Declaration
public RichTextUnit(double value, RichTextUnitType type)
Parameters
System. Specifies the value of the measurement unit. |
Rich Specifies the type of the measurement unit. |
Properties
Type
Gets the type of the measurement unit type.
Declaration
public RichTextUnitType Type { get; }
Property Value
Value
Gets the value of the measurement unit type.
Declaration
public double Value { get; }
Property Value
System.
|
Methods
CompareTo(RichTextUnit)
Compares the current Rich
Declaration
public int CompareTo(RichTextUnit unit)
Parameters
Rich Specifies the Rich |
Returns
System. 0 - if the current Rich |
Equals(Object)
Determines if the current Rich
Declaration
public override bool Equals(object other)
Parameters
System. Specifies the System. |
Returns
System. True - if the two objects are equal, False - otherwise. |
Equals(RichTextUnit)
Determines if the current Rich
Declaration
public bool Equals(RichTextUnit unit)
Parameters
Rich Specifies the Rich |
Returns
System. True - if the current Rich |
GetHashCode()
Computes the hash code of the current Rich
Declaration
public override int GetHashCode()
Returns
System. The computed hash code of the current Rich |
Parse(String)
Parses the specified string to a Rich
Declaration
public static RichTextUnit Parse(string text)
Parameters
System. Specifies the string to parse to. |
Returns
Rich The parsed Rich |
Exceptions
System. If the specified string is not in a valid format. |
ToString()
Converts the current Rich
Declaration
public override string ToString()
Returns
System. The string representation of the current Rich |
ToUnit(RichTextUnitType)
Converts the current Rich
Declaration
public RichTextUnit ToUnit(RichTextUnitType type)
Parameters
Rich Specifies the Rich |
Returns
Rich The new Rich |
TryParse(String, out RichTextUnit)
Attempts to parse the specified string to a Rich
Declaration
public static bool TryParse(string text, out RichTextUnit unit)
Parameters
System. Specifies the string to parse to. |
Rich Outputs the parsed Rich |
Returns
System. True - if the parse operation is successful, False - otherwise. |
Operators
Equality(RichTextUnit, RichTextUnit)
Compares the two operands for equality.
Declaration
public static bool operator ==(RichTextUnit left, RichTextUnit right)
Parameters
Rich Specifies the left operand of the comparison. |
Rich Specifies the right operand of the comparison. |
Returns
System. True - if the two operands are equal, False - otherwise. |
Explicit(RichTextUnit to Double)
Converts the specified Rich
Declaration
public static explicit operator double (RichTextUnit unit)
Parameters
Rich Specifies the Rich |
Returns
System.
|
GreaterThan(RichTextUnit, RichTextUnit)
Determines if the left operand is greater than the right operand.
Declaration
public static bool operator>(RichTextUnit left, RichTextUnit right)
Parameters
Rich Specifies the left operand of the comparison. |
Rich Specifies the right operand of the comparison. |
Returns
System. True - if the left operand is greater than the right operand, False - otherwise. |
GreaterThanOrEqual(RichTextUnit, RichTextUnit)
Determines if the left operand is greater or equal the right operand.
Declaration
public static bool operator >=(RichTextUnit left, RichTextUnit right)
Parameters
Rich Specifies the left operand of the comparison. |
Rich Specifies the right operand of the comparison. |
Returns
System. True - if the left operand is greater or equal the right operand, False - otherwise. |
Implicit(Double to RichTextUnit)
Converts the specified value in pixels to Rich
Declaration
public static implicit operator RichTextUnit(double value)
Parameters
System. Specifies the value in pixels to convert to. |
Returns
Implicit(String to RichTextUnit)
Converts the specified string to a Rich
Declaration
public static implicit operator RichTextUnit(string text)
Parameters
System. Specifies the string to convert to. |
Returns
Inequality(RichTextUnit, RichTextUnit)
Compares the two operands for inequality.
Declaration
public static bool operator !=(RichTextUnit left, RichTextUnit right)
Parameters
Rich Specifies the left operand of the comparison. |
Rich Specifies the right operand of the comparison. |
Returns
System. True - if the two operands are not equal, False - otherwise. |
LessThan(RichTextUnit, RichTextUnit)
Determines if the left operand is less than the right operand.
Declaration
public static bool operator <(RichTextUnit left, RichTextUnit right)
Parameters
Rich Specifies the left operand of the comparison. |
Rich Specifies the right operand of the comparison. |
Returns
System. True - if the left operand is less than the right operand, False - otherwise. |
LessThanOrEqual(RichTextUnit, RichTextUnit)
Determines if the left operand is less or equal the right operand.
Declaration
public static bool operator <=(RichTextUnit left, RichTextUnit right)
Parameters
Rich Specifies the left operand of the comparison. |
Rich Specifies the right operand of the comparison. |
Returns
System. True - if the left operand is less or equal the right operand, False - otherwise. |