private void CodeEditorServiceRequestSetCaret(object sender, SetCaretEventArgs e) { if (e.DocumentFile != ViewModel.DocumentFile) { return; } var offset = codeEditor.Document.GetOffset(new TextLocation(e.Line + 1, e.Column + 1)); codeEditor.TextArea.Caret.Offset = offset; codeEditor.Focus(); }
protected virtual void OnRequestSetCaret(SetCaretEventArgs e) { RequestSetCaret?.Invoke(this, e); }