Is possible to get a index from a item in a list?
问题 I mean, I've got a listBox, and I'm putting in itemsSource property the list. And I want to show also the index in the binding of it. I have no idea if this is possible in WPF. Thanks. 回答1: There are a few methods for doing this including some workarounds using the AlternationIndex. However, since I've used the AlternationIndex for other purposes I like to get a binding for the element index with the following: <MultiBinding Converter="{StaticResource indexOfConverter}"> <Binding