I have a ListBox, that has a ContextMenu. I defined an ItemTemplate for the Listbox, and set up an eventhandler for the “OnTap” event. When It fires, I do an action with that. I use the ContextMenu to give the ability to delete / edit an item.
My Problem is the following:
If I trigger the context menu via a “long tap” on an Item, It won’t be selected in the ListBox, so that I cannot access It. I would like to know, which Item was “long taped”. Is there a good practice for that?
Thanks
Answer is here: http://forums.create.msdn.com/forums/t/85263.aspx
Essentially, use the Silverlight toolkit GestureListener to catch the long hold and then in the event handler, you can look at the DataContext of the sender to get to the proper item.