WPF TabControl On SelectionChanged, set focus to a text field

后端 未结 1 994
梦如初夏
梦如初夏 2021-01-05 19:07

I have a tab control, and a few tab items. I am successfully listening to the SelectionChanged event, and checking if the tab I\'m interested in is the currentl

相关标签:
1条回答
  • 2021-01-05 19:17

    Try putting the .Focus() calls inside a dispatcher.BeginInvoke.

    Dispatcher.BeginInvoke(new Action(() => { txtsvc.Focus(); }));
    
    0 讨论(0)
提交回复
热议问题