I need to set focus to UserControl
itself, not its child.
Otherwise I cannot implement insertion from the buffer. :(
Setting Focusable=True
The whole problem was in my misunderstanding of controls' behavior.
This SO question clearly shows it I believe.
Thus, setting UserControl.Focusable = true
is not sufficient. To make it navigatable via keyboard IsTabStop
must be true
also. And to make UC selectable by mouse click we should call Focus()
in mouse eventhandler. That's it.