Set Item Focus in ListView WPF

后端 未结 5 1825
轻奢々
轻奢々 2020-11-29 10:45

is there any way to accomplish this functionality from WinForms in WPF?

ListView.FocusedItem = ListView.Items[itemToFocusIndex]

I\'m trying

5条回答
  •  渐次进展
    2020-11-29 11:11

    I believe you can use Keyboard.FocusedElement to get the focused element in the listview.

    Keyboard.FocusedElement
    

    should return the focused element

提交回复
热议问题