
I have a WPF application which uses Syntax Editor on demand. To achieve this, on some key event I create an instance of Syntax Editor and append it to children of a grid. Immediately I call editor.Focus() or editor.ActiveView.Focus(). In both scenarios the editor is getting focused but editor is not listening key strokes and caret is invisible.
How can I dynamically set keyboard focus to syntax editor and continue to edit without additional mouse clicks?
Thanks.