Table of Contents

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

Position int

The nearest UTF-16 source boundary.

Affinity RichTextCaretAffinity

The source edge chosen at an ambiguous boundary.

Kind RichTextHitKind

Whether the point is over source, whitespace, or an adornment.

Adornment RichTextAdornment

The application adornment, when applicable.

Properties

Adornment

The application adornment, when applicable.

public RichTextAdornment? Adornment { get; init; }

Property Value

RichTextAdornment

Affinity

The source edge chosen at an ambiguous boundary.

public RichTextCaretAffinity Affinity { get; init; }

Property Value

RichTextCaretAffinity

Kind

Whether the point is over source, whitespace, or an adornment.

public RichTextHitKind Kind { get; init; }

Property Value

RichTextHitKind

Position

The nearest UTF-16 source boundary.

public int Position { get; init; }

Property Value

int

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

Position int
Affinity RichTextCaretAffinity
Kind RichTextHitKind
Adornment RichTextAdornment

Equals(RichTextHit?)

public bool Equals(RichTextHit? other)

Parameters

other RichTextHit

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(RichTextHit?, RichTextHit?)

public static bool operator ==(RichTextHit? left, RichTextHit? right)

Parameters

left RichTextHit
right RichTextHit

Returns

bool

operator !=(RichTextHit?, RichTextHit?)

public static bool operator !=(RichTextHit? left, RichTextHit? right)

Parameters

left RichTextHit
right RichTextHit

Returns

bool