Alex Rivera | Logout

Cursor Focus on Textbox in WPF/C#

Asked 2009-05-06T05:31:50.617
22

I am currently in the process of creating a Onscreen keyboard. I am handling the button click using routedcommands. The issue is that when i click on the button in keyboard panel the focus shifts to the button rather than on the Textbox. The requirement states that a cursor should always appear in the text box to indicate the position where the next character will be inserted. Is there a way i can keep focus on the textbox while button is clicked.

Edit
Report

1 Answer

3

The way I solved this problem was to set focusable=false to all the buttons/controls on the keyboard. That way you don't lose focused of the current control.

answered 2011-12-22T16:35:24.363

Your Answer