0

I have the following List:

ListViews with Expander-Items

These are ListView with Expanders as ListViewItems. The ListView itself is in a ScrollViewer to make the right scrolling behaviour. My Problem is that the MouseWheel is not working on this List.

Here is the XAML:

<Window x:Class="ResourceListExpanderStyle.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converter="clr-namespace:ResourceListExpanderStyle.Converter"
    Title="MainWindow" Height="350" Width="525">
<Window.Resources>
    <converter:DeviceTypeGroupToDeviceListConverter x:Key="DeviceTypeGroupToDeviceListConverter" />
    <converter:IntegerToBrushConverter x:Key="IntegerToBrushConverter" />
</Window.Resources>
<DockPanel>
    <ScrollViewer x:Name="ScrollViewer">
        <ListView x:Name="OuterListView" ItemsSource="{Binding DeviceTypeGroupListByStation}" HorizontalContentAlignment="Stretch">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <Expander Header="{Binding Path=NAME}" Background="{Binding Path=BACKCOLOR, Converter={StaticResource IntegerToBrushConverter}}">
                        <ListView x:Name="InnerListView" ItemsSource="{Binding Converter={StaticResource DeviceTypeGroupToDeviceListConverter}}" HorizontalContentAlignment="Stretch">
                            <ListView.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Path=NAME}" Background="{Binding Path=BACKCOLOR, Converter={StaticResource IntegerToBrushConverter}}" />
                                </DataTemplate>
                            </ListView.ItemTemplate>
                        </ListView>
                    </Expander>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </ScrollViewer>
</DockPanel>

Any Idea?

Community
  • 1
  • 1
GreenEyedAndy
  • 1,485
  • 1
  • 14
  • 31

0 Answers0