ComboBox
ドロップダウンで自動スクロール効果を無効にすることはできますか?問題は、マウスが開いている最後の要素の上にマウスを置いたときに自動的に次の要素にスクロールします。ComboBox
コンボボックス(WPF)でのマウスオーバーのスクロールを無効にする
そして、私の場合にはComboBox
は、画面の下部にある、リストが上向きに表示され、私はComboBox
を開き、マウスを動かすと、それはすぐにスクロールダウンます。..私のXAMLは次のようになります。
<ComboBox x:Name="serverSelection" ScrollViewer.CanContentScroll="False" Width="268" Height="54" FontSize="18" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" SelectedIndex="0">
<ComboBoxItem Content="xenappts01" HorizontalAlignment="Left" Width="280" Height="54" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<ComboBoxItem Content="xenappts02" HorizontalAlignment="Left" Width="280" Height="54" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<ComboBoxItem Content="xenappts03" HorizontalAlignment="Left" Width="280" Height="54" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<ComboBoxItem Content="xenappts04" HorizontalAlignment="Left" Width="280" Height="54" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<ComboBoxItem Content="xenappts05" HorizontalAlignment="Left" Width="280" Height="54" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<ComboBoxItem Content="xenappts05c" HorizontalAlignment="Left" Width="280" Height="54" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
</ComboBox>
私はScrollViewer.CanContentScroll="False"
を設定しようとしましたが、それは動作しませんでした。
これは、次のようになります。
https://i.stack.imgur.com/GcwJX.gif
あなたの助けをありがとう!あなたがComboBoxItem
コンテナのRequestBringIntoView
イベントを処理することができ
実際に働いていたあなたの質問 – Ben