我正在使用 MSFT 的分组项目页面模板,并且出于特定原因想要禁用水平滚动。我通过设置 Scrollviewer.HorizontalScrollScrollbarVisibility = "Disabled" 来做到这一点。当我尝试向左或向右拖动屏幕时,它似乎被禁用,但当我使用鼠标滚轮时效果很好。你能帮忙看看如何在使用鼠标滚轮时防止水平滚动吗?
<!-- Horizontal scrolling grid used in most view states -->
<local:VariableGridView
x:Name="itemGridView"
AutomationProperties.AutomationId="ItemGridView"
AutomationProperties.Name="Grouped Items"
Padding="116,137,40,46"
ItemsSource="{Binding Source={StaticResource groupedItemsViewSource}}"
ItemTemplate="{StaticResource CustomTileItem}"
SelectionMode="None"
IsSwipeEnabled="False"
IsItemClickEnabled="True"
ItemClick="ItemView_ItemClick" Grid.RowSpan="4" Grid.ColumnSpan="2"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" >