LongListSelector: Item tap?

后端 未结 6 757
执念已碎
执念已碎 2020-12-02 20:39

I am using LongListSelector control on Windows Phone 8 and can\'t figure out the best way to handle a tap on an item. The few examples I\'ve found rely on the SelectionChang

6条回答
  •  情书的邮戳
    2020-12-02 21:01

    first add this to *.xaml page inside the

    LongListSelectorSelectionChanged="listBox_SelectionChanged"
    

    so that it looks like this :

    
    

    then in the *.xaml.cs file in the event handler

    private void listBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        // Write your logic on what you want to do with the selected item
    }
    

提交回复
热议问题