Im writing my Windows phone 8 app which uses LongListSelector to display some data.
How to set different item template for first and last item in LongListSelector?
Basically I just want to display same information in every item but use little different item "layout" in last and first item.
You could implement some kind of data template selector to help in determining which template to select based on index. You can start off by creating a reusable abstract
TemplateSelector
class. I used many of the ideas explained in Implementing Windows Phone 7 DataTemplateSelector and CustomDataTemplateSelector but modified implementation to allow for selecting templates based on index instead.Once you have that class you can add your own data template selector logic. In your case, could be something like this
And finally the Xaml