Tharanga
Tharanga

Reputation: 127

WP 7 click event of the Listbox Item cell

I added items to the Listbox. Now I want to click on that each cell and move to the different pages.

How to identify selected cell in the List?

Upvotes: 1

Views: 222

Answers (1)

Olter
Olter

Reputation: 1139

You should work with sender at your click event handler.

YourItemType _sender = sender as YourItemType;

Then, you can find out what item exactly it is. Do you have some unique field for your item? Use it.

if (_sender.uniqueValue == something)
{
   NavigationService.Navigate(...)
}

Upvotes: 1

Related Questions