public void MoveTo(int offset) { startPosition = null; endPosition = TextInformation.Document.CreatePosition(offset, Bias.Backward); CaretChanged?.Invoke(this, EventArgs.Empty); UpdateSelectionHighlight(); InvalidateLayout(); }
void UpdatePositions(object sender, TextModificationEventArgs e) { if (SelectionEndOffset == SelectionStartOffset) { startPosition = null; } CaretChanged?.Invoke(this, EventArgs.Empty); UpdateSelectionHighlight(); InvalidateLayout(); }
private void UpdaterCaretOnTick(object sender, EventArgs eventArgs) { updaterCaret.Stop(); CaretChanged?.Invoke(this, EventArgs.Empty); }