The application that I am developing has a kind of accordion consisting of expanders, but each exapnder acts independently, and not only allows you to open one open element at the same time. Each expander is associated with an item in the collection in the view model.
My solution now is to use a list and then bind the itemsource list to the collection and have an element template displaying the contents of the expander and exapnders.
The problem is that listbox treats each expander as an element (obviously) and allows you to select and select. The selection is a little ugly and can be turned off, but the selection causes some problems because it causes the list to scroll to show as much of the extended expander as possible.
Is there a WPF control that looks a bit like a glass pane (maybe) that will allow me to link the contained controls using element templates, but without selection and selection?

<ListBox Grid.Row="0" Grid.Column="0" Width="Auto" SelectionMode="Single" ItemsSource="{Binding Path=MeasurementSources}"> <ListBox.ItemTemplate> <DataTemplate> <Expander Header="{Binding Name}" IsEnabled="{Binding Available}"> <ListBox Width="Auto" SelectionMode="Single" ItemsSource="{Binding Path=Measurements}" SelectedItem="{Binding Path=SelectedMeasurement}"> <ListBox.ItemTemplate> <DataTemplate> <WrapPanel> <TextBlock Text="{Binding Name}" FontWeight="Bold" /> <TextBlock Text=" "/> <TextBlock Text="{Binding Created}"/> </WrapPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Expander> </DataTemplate> </ListBox.ItemTemplate> </ListBox>
source share