Class RichTextHit
- Namespace
- RichEdit.Maui
- Assembly
- RichEdit.Maui.dll
A source-position hit without changing selection, scrolling, or folding.
public sealed record RichTextHit : IEquatable<RichTextHit>
- Inheritance
-
RichTextHit
- Implements
- Inherited Members
Constructors
RichTextHit(int, RichTextCaretAffinity, RichTextHitKind, RichTextAdornment?)
A source-position hit without changing selection, scrolling, or folding.
public RichTextHit(int Position, RichTextCaretAffinity Affinity, RichTextHitKind Kind, RichTextAdornment? Adornment = null)
Parameters
PositionintThe nearest UTF-16 source boundary.
AffinityRichTextCaretAffinityThe source edge chosen at an ambiguous boundary.
KindRichTextHitKindWhether the point is over source, whitespace, or an adornment.
AdornmentRichTextAdornmentThe application adornment, when applicable.
Properties
Adornment
The application adornment, when applicable.
public RichTextAdornment? Adornment { get; init; }
Property Value
Affinity
The source edge chosen at an ambiguous boundary.
public RichTextCaretAffinity Affinity { get; init; }
Property Value
Kind
Whether the point is over source, whitespace, or an adornment.
public RichTextHitKind Kind { get; init; }
Property Value
Position
The nearest UTF-16 source boundary.
public int Position { get; init; }
Property Value
Methods
Deconstruct(out int, out RichTextCaretAffinity, out RichTextHitKind, out RichTextAdornment?)
public void Deconstruct(out int Position, out RichTextCaretAffinity Affinity, out RichTextHitKind Kind, out RichTextAdornment? Adornment)
Parameters
PositionintAffinityRichTextCaretAffinityKindRichTextHitKindAdornmentRichTextAdornment
Equals(RichTextHit?)
public bool Equals(RichTextHit? other)
Parameters
otherRichTextHit
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(RichTextHit?, RichTextHit?)
public static bool operator ==(RichTextHit? left, RichTextHit? right)
Parameters
leftRichTextHitrightRichTextHit
Returns
operator !=(RichTextHit?, RichTextHit?)
public static bool operator !=(RichTextHit? left, RichTextHit? right)
Parameters
leftRichTextHitrightRichTextHit