Esempio n. 1
0
 private void CodeEditor_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     if (!AvalonEditor.IsFocused)
     {
         AvalonEditor.Focus();
     }
 }
Esempio n. 2
0
        private void FocusTabOnFile(CodeFile file, bool setFocus)
        {
            tabControl.FocusOn(file);

            if (setFocus)
            {
                Dispatcher.BeginInvoke(new Action(() => AvalonEditor.Focus())); // official hack! BAD!
                AvalonEditor.Focus();
            }
        }
Esempio n. 3
0
        // ----------------------------------------------------------------------------------------
        public void SetCaretTo(CodeFile file, int offset)
        {
            OpenTab(file, false);

            AvalonEditor.CaretOffset = offset;
            AvalonEditor.Focus();
            ScrollTo(file, offset);

            SelectCurrentErrorForCaret();
        }
Esempio n. 4
0
 public void ForceFocus()
 {
     Dispatcher.BeginInvoke(new Action(() => AvalonEditor.Focus())); // official hack! BAD!
     AvalonEditor.Focus();
 }