Class TextSelection
- Namespace
- TextEdit.Core
- Assembly
- TextEdit.Core.dll
A directional selection with an identity retained through edits.
public sealed record TextSelection : IEquatable<TextSelection>
- Inheritance
-
TextSelection
- Implements
- Inherited Members
Constructors
TextSelection(int, int)
Creates a selection with a new view-local identity.
public TextSelection(int anchor, int active)
Parameters
Properties
Active
Gets the moving UTF-16 endpoint.
public int Active { get; init; }
Property Value
ActiveVirtualSpaces
Gets the number of unmaterialized spaces beyond the active endpoint's logical line end.
public int ActiveVirtualSpaces { get; init; }
Property Value
Affinity
Gets the preferred native visual edge.
public CaretAffinity Affinity { get; init; }
Property Value
Anchor
Gets the fixed UTF-16 endpoint.
public int Anchor { get; init; }
Property Value
AnchorVirtualSpaces
Gets the number of unmaterialized spaces beyond the anchor's logical line end.
public int AnchorVirtualSpaces { get; init; }
Property Value
Id
Gets the stable selection identity.
public Guid Id { get; init; }
Property Value
IsEmpty
Gets whether both real and virtual endpoints coincide.
public bool IsEmpty { get; }
Property Value
PreferredVisualX
Gets the preferred device-independent X coordinate for native vertical navigation, or null after other movement.
public double? PreferredVisualX { get; init; }
Property Value
Range
Gets the normalized source range.
public TextSpan Range { get; }