Cursor Focus on Textbox in WPF/C#

前端 未结 8 1024
星月不相逢
星月不相逢 2020-12-23 22:14

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

8条回答
  •  独厮守ぢ
    2020-12-23 22:40

    Your problem can be solved by using a separate focus scope for your "keyboard". Just apply the following property to the control that contains all of your buttons and then they will be in a separate focus scope and will not have the focus set to them when clicked

    FocusManager.IsFocusScope="True"
    

提交回复
热议问题