Class CodeTextSelection
- Namespace
- CodeEdit.Maui
- Assembly
- CodeEdit.Maui.dll
A stable source-only selection facade.
public sealed class CodeTextSelection : INotifyPropertyChanged
- Inheritance
-
CodeTextSelection
- Implements
- Inherited Members
Properties
Active
Gets the caret endpoint.
public int Active { get; }
Property Value
Anchor
Gets the fixed endpoint.
public int Anchor { get; }
Property Value
Range
Gets the normalized UTF-16 range.
public TextSpan Range { get; }
Property Value
State
Gets the anchor and active endpoints.
public TextSelectionState State { get; }
Property Value
Text
Gets the selected source.
public string Text { get; }
Property Value
Methods
ReplaceText(string?)
Replaces the selection with source text and advances the caret.
public void ReplaceText(string? text)
Parameters
textstringThe replacement source.
Select(TextSelectionState)
Sets a directional selection.
public void Select(TextSelectionState selection)
Parameters
selectionTextSelectionStateThe anchor and active offsets.
Select(TextSpan)
Selects a range with the caret at its end.
public void Select(TextSpan range)
Parameters
rangeTextSpanThe range to select.
Events
PropertyChanged
public event PropertyChangedEventHandler? PropertyChanged