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.
精彩评论