Xamarin Forms - Get position of item selected in Listview

后端 未结 2 918
慢半拍i
慢半拍i 2020-12-18 00:47

Im having a bit of trouble trying to get the position of an item in a ListView when its tapped.

Heres my code:

public MainPage()
{
    InitializeComp         


        
2条回答
  •  臣服心动
    2020-12-18 01:44

    While adding items in listView , you can set styleId of that item . in ItemTapped body you will have access to that item thereby access to styleId of that item .

提交回复
热议问题