有没有办法将 Keyboard.FocusedElement 设置为特定元素?
Keyboard.FocusedElement 给出具有键盘焦点的元素。然而它没有设置器。我想通过代码将此属性设置为另一个元素。有办法吗?
在微软网站上,它这样说:“键盘焦点是指正在接收键盘输入的对象。具有键盘焦点的元素将 IsKeyboardFocused 设置为 true。”
然而 IsKeyboardFocused 也没有设置器。
Keyboard.FocusedElement gives the element that has keyboard focus. However it has no setter. I want to set this property to another element through code. is there a way?
On microsoft's site, it said this: "Keyboard focus refers to the object that is receiving keyboard input. The element with keyboard focus has IsKeyboardFocused set to true."
However IsKeyboardFocused also has no setter as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您只是在寻找
UIElement.Focus()
方法。I think you are just looking for the
UIElement.Focus()
method.