I have an ItemsControl:
<StackPanel>
<ItemsControl x:Name="TopicList">
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:TopicListItem Title="{Binding Title}" LocationCloud="{Binding Locations}" TagCloudData="{Binding TagCloudData}" SparklineData="{Binding SparklineData}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
Then I get some XML and turn that into an IEnumerable<ListObj>
using LINQ which is then attached to TopicList.ItemsSource
. As you see the only element in the list is a UseControl that I made myself called TopicListItem
. I want to be able to access the index of items that the ItemsControl has from the TopicListItem.xaml.cs
file so that as I click on one of them to perform an open action, I can close the rest.
Thanks for the help :)
(and I have tried Accordion and AccordionItems, to stiff for my taste :D )