Set Item Focus in ListView WPF

后端 未结 5 1837
轻奢々
轻奢々 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:08

    //to set focus write
    CollistView7.Items[TheIndItem].Selected = true; 
    CollistView7.Select();
    CollistView7.Items[TheIndItem].Focused = true;
    //when TheIndItem is the index
    

提交回复
热议问题