1

Silverlight ベースの Web アプリがあります。ListBox がマウス ホイール スクロールでスクロールしないことがわかりました。垂直スクロールバーをクリックしてスクロールできます。マウス ホイールまたは 2 本指スクロールを使用すると、機能しません。ここでは、リスト ボックス 2 のマウス ホイール スクロールは正常に機能していますが、リスト ボックス 1 では機能しません。

リストボックス 1

<Border CornerRadius="6,6,0,0" Grid.Row="1" Margin="2,5,2,0" BorderThickness="1,1,1,0" BorderBrush="#FFC4C4C4">
<Grid>
      <ListBox x:Name="filterListBox" Grid.Row="0" Grid.Column="1" Background="Transparent" SelectedIndex="{Binding SelectedFilterIndex, Mode=TwoWay}"  SelectedItem="{Binding SelectedFilterItem, Mode=TwoWay}" SelectionChanged="ListBox_SelectionChanged"  BorderThickness="0" VerticalAlignment="Center" Margin="5,3" ItemContainerStyle="{StaticResource FilterListBoxItemStyle}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="SelectionChanged">
                            <ei:CallMethodAction TargetObject="{Binding}" MethodName="FilterSelectionChanged"/>
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <StackPanel Orientation="Horizontal"/>
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                    <ListBoxItem Padding="7,2" VerticalContentAlignment="Center" Tag="Popular" Visibility="{Binding Path=IsPopularChannelTab, Mode=TwoWay, Converter={StaticResource BoolToVisibilityConverter}}">
                            <TextBlock Text="{Binding Path=PopularChannelsText, Source={StaticResource PageStrings}}" FontSize="13" FontWeight="SemiBold" FontFamily="Arial" VerticalAlignment="Center" />
                        </ListBoxItem>
                    <ListBoxItem  IsEnabled="False" VerticalContentAlignment="Center" Visibility="{Binding Path=IsPopularChannelTab, Mode=TwoWay, Converter={StaticResource BoolToVisibilityConverter}}">
                            <StackPanel Orientation="Horizontal">
                                <Border BorderBrush="#FFBDBDBD" BorderThickness="0,2,2,2" HorizontalAlignment="Center" VerticalAlignment="Center" Height="20"/>
                                <Border BorderBrush="#FFF8F8F8" BorderThickness="0,2,2,2" HorizontalAlignment="Center" VerticalAlignment="Center" Height="20"/>
                            </StackPanel>
                        </ListBoxItem>
                    <ListBoxItem Padding="7,2" VerticalContentAlignment="Center" Tag="All">
                        <TextBlock Text="{Binding Path=AllChannelsText, Source={StaticResource PageStrings}}" FontSize="12" FontWeight="SemiBold" FontFamily="Arial" VerticalAlignment="Center"/>
                    </ListBoxItem>
                    <ListBoxItem  IsEnabled="False" VerticalContentAlignment="Center">
                        <StackPanel Orientation="Horizontal">
                            <Border BorderBrush="#FFBDBDBD" BorderThickness="0,2,2,2" HorizontalAlignment="Center" VerticalAlignment="Center"  Height="20"/>
                            <Border BorderBrush="#FFF8F8F8" BorderThickness="0,2,2,2" HorizontalAlignment="Center" VerticalAlignment="Center" Height="20"/>
                        </StackPanel>
                    </ListBoxItem>
                    <ListBoxItem Padding="7,2" VerticalContentAlignment="Center" Tag="Favorites">
                        <TextBlock Text="{Binding Path=FavoritesText, Source={StaticResource PageStrings}}" FontSize="13" FontWeight="SemiBold" FontFamily="Arial" VerticalAlignment="Center"/>
                    </ListBoxItem>

                </ListBox>
</Grid>
</Border>               

リストボックス 2

<Grid Visibility="{Binding Path=IsHavingProvider, Converter={StaticResource BoolToVisibilityConverter}}" Margin="0,20,0,0" Grid.Row="4">
                <Grid.RowDefinitions>
                    <RowDefinition Height="18"/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>

                <core:MagicTextBlock Grid.Row="0" TextBlockStyle="{StaticResource TextBlock_Style}" Text="{Binding Path=Activity, Source={StaticResource PageStrings}}" />

                <ListBox Margin="0,10,0,0" Grid.Row="1"  x:Name="Provider" Width="480" Height="195" HorizontalAlignment="Left"  ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ItemsSource="{Binding Providers,Mode=TwoWay}"
                    SelectedItem="{Binding SelectedProvider,Mode=TwoWay}"
                    ItemContainerStyle="{StaticResource Table_ListBoxItem_Style}"
                    DisplayMemberPath="name">
                </ListBox>
            </Grid>
4

1 に答える 1