How can i know if a ListBoxItem is the last item inside a Wpf's ListBox?
How can i know if a ListBoxItem is the last item of the collection (in the ItemContainerStyle or in the ItemContainer 's template) inside a Wpf's ListBox ? That question is because I need to know if an item is the last item to show it in other way. For example: suppose i want to show items separated by semi-colons but the last one: a;b;c This is easy to do in html and ccs, using ccs selector. But, how can i do this in Wpf? As it seems to be rather difficult to implement an "Index" attached property to ListBoxItem to do the job right, I believe the easier way to accomplish that would be in MVVM