示例#1
0
        public void MoveTo(int offset)
        {
            startPosition = null;
            endPosition   = TextInformation.Document.CreatePosition(offset, Bias.Backward);

            CaretChanged?.Invoke(this, EventArgs.Empty);
            UpdateSelectionHighlight();
            InvalidateLayout();
        }
示例#2
0
        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);
 }