I have an ItemsControl with ListViews inside to make a custom grid like layout Here is roughly what the code looks like to do this, names changed and irrelevant styling is removed.
Each ListView is created by an instance of ItemsSubList and therefore there is no set amount of listboxes or properties to be made.
Does anyone know How I would be able to bind the SelectedItem property of each listbox out somehow, into a list preferably.
<ItemsControl ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<ListView ItemsSource="{Binding ItemsSubList}"
DisplayMemberPath="ItemVersion"
SelectionMode="Single"
Width="100"
VerticalAlignment="Top"
Background="#282828"
BorderBrush="#282828">
</ListView>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>