单击按钮时将焦点设置在文本框上 [英] set focus on text box when a button is clicked

查看:68
本文介绍了单击按钮时将焦点设置在文本框上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我在一个窗口中有文本框,在另一个窗口中有一个按钮(虚拟键盘),但是在同一解决方案中两个窗口都..单击按钮时如何设置文本框的焦点..请清除此问题..

在此先感谢..

hi all,
I''m having textbox in one window and a button(virtual keyboard) in another window but both window in same solution..how can i set focus on textbox when a button is clicked..clear this issue please..

thanks in advance..

推荐答案

WPF中的焦点是一件复杂的事情.但是,简单的myTextBox.Focus()确实可以.

要深入研究重点概念,请从此处开始: http://msdn.microsoft.com/en-我们/library/aa969768.aspx [ ^ ].

—SA
Focus in WPF is a complex matter. However, a simple myTextBox.Focus() does work.

To delve in the depths of focusing concepts, start here: http://msdn.microsoft.com/en-us/library/aa969768.aspx[^].

—SA


这篇关于单击按钮时将焦点设置在文本框上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆