【发布时间】:2015-02-10 01:55:32
【问题描述】:
我使用 C#/XAML 创建了一个 Windows 8 应用商店应用程序。我的界面包括一个可滚动的列表,它使用ScrollViewer 呈现。我希望能够处理列表中元素的操作事件,但是,将列表元素上的 ManipulationMode 设置为 None 以外的任何内容都会导致我的列表不再滚动。
这是 UI 的简化版本:
<ScrollViewer>
<Border/> <!-- these contain child content -->
<Border/>
<Border/>
<!-- Set ManipulationMode on an element in order to receive manipulation events -->
<!-- This causes the scroll viewer to stop working! -->
<Border ManipulationMode="All"
ManipulationDelta="..."/>
<Border/>
<Border/>
</ScrollViewer>
我了解 WinRT ScrollViewer 出于性能原因使用 System 的特殊 ManipulationMode,但我想要一个垂直滚动列表,其中包含响应水平操作/手势的元素。谁能想到一个创造性的解决方法来实现这一点?
【问题讨论】:
标签: windows-8 windows-runtime windows-store-apps winrt-xaml