【发布时间】:2014-12-11 12:46:53
【问题描述】:
我的问题如下。当我滚动时,如果我的手指触摸按钮,将调用该命令。如果用户滚动和相反,MVVM 架构的最佳方式是如何停止此操作并停用按钮。
<ScrollViewer PanningMode="Both" PanningDeceleration="0.001" PanningRatio="2">
<Grid>
<ItemsControl ItemsSource="{Binding ListGstDescriptors}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Command="{StaticResource ChangeSavedViewCommand}"
CommandParameter="{Binding GstDescriptorAcDescriptor}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</ScrollViewer>
【问题讨论】: