Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想始终将焦点设置在文本框上。我在 wpf 中创建一个应用程序,在搜索页面中有一个文本框,我想始终将焦点设置到该文本框,如果用户单击页面中的任何位置,taxtbox 应该获得焦点。如何完成这个任务。
吉萨。
尽管使用方法再次处理和设置焦点到同一元素的解决方案LostKeyboardFocus, LostKeyboardFocus您可以在这里Keyboard.Focus找到很多建议和其他解决方案
LostKeyboardFocus
Keyboard.Focus