开发者

Is there a way to set Keyboard.FocusedElement to a specific element?

Keyboard.FocusedEle开发者_运维问答ment 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.


I think you are just looking for the UIElement.Focus() method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜