Get the index of the selected item in longlistselector

前端 未结 2 1407
死守一世寂寞
死守一世寂寞 2021-01-16 03:24

I have a long list selector


 

        
2条回答
  •  粉色の甜心
    2021-01-16 03:59

    sender is going to be who sent the fact that this event occurred. See SelectionChangedEventArgs at MSDN to know that you'll want to do e.AddedItems[0] if single-select list, or if multi-select list, you'll need to loop over it:

    foreach(var item in e.AddedItems)
    

提交回复
热议问题