» LongListSelector: Item tap?
LongListSelector: Item tap?
|January 8, 2013
Posted by forumadmin
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 SelectionChanged event. However, this solution is buggy because if I tap an item that opens a new page, hit back, and then tap the same item again, it won’t work because this item is already selected, so SelectionChanged is not triggered.
I tried to register to the tap event and use the current selected item as the tapped one, but some times the current selected item is not the one I expect.
I could wrap my ItemTemplate in a button and handle the tap for each item but I need to reskin the button to make it look like a simple list item.
Finally, I don’t understand why it is so complicated to achieve such a basic thing. Is there a simple and standard way I missed?
My second wish is to get an effect on the item when it is tapped. Is there any standard way to do it?
More Related Questions
- How to remove "tap" event from “Group Header” and manually call the “Jump List” in “Long List Selector”? I am using Long List Selector in my app, I have made groups and group headers in it.
Now, I am adding a button in the group header and want the button to open new page.
But, when I click […]
- Phone 8 XAML: Horizontal Alignment in LongListSelector I've got a long list selector.
All I want to do is to align two elements inside the ItemTemplate:
1. a button to the right with a given, fixed width
2. a text panel to the left that […]
- Long List Selector do not refresh object placed in a specific position LongListSelector do not refresh object placed in a specific position(after updating that object), but refreshes all other objects.
Like, when there is only one object in LLS, the only […]
- read the control that you touched in a longlistselector I have a longlistselector to show a gallery of the projects that I have in my app. Every item of the longlistselector have an image of the project, the name and an image to share it in […]
- LongListSelector not scrolling I am having trouble getting my long list selector to work properly. When the list is taller than the screen, the long list selector stays static and I am unable to scroll to see all of […]
- LongListSelector performance is very bad when enclosed in ScrollViewer I have a UserControl that needs to contain a bunch of controls on top and a LongListSelector below them. Total height of the whole UserControl may (and almost always will) exceed the […]
- Hold Event Longlistselector Hej
I want to create a standard holdevent. When you hold an element, there would appear some options you could chose like a new list.
How do you create this, is it just simply done with […]
- LongListSelector and DataTemplateSelector I'm using the LongListSelector to realize List or Grid display for my items. For this, I created a DataTemplateSelector and I change the LayoutMode property at runtime. This is working but […]
- Navigation Error in window phone 8 I have one application that has several pages; therefore, I want user to navigate to and back from one page to another with the some data sent back and forth. I could navigate to next page […]
- How does one implement pull-to-refresh with a LongListSelector in Windows Phone 8? I am writing a new WP8 app using the off-the-shelf LongListSelector that is shipped in the Microsoft.Phone.Controls assembly. Can anyone provide a code example that implements […]