【发布时间】:2016-05-17 12:05:25
【问题描述】:
无论出于何种原因,我有一个在 Y 坐标中翻转的 ItemsControl,其中我有一个 ScrollViewer:
<ItemsControl ...>
...
<ItemsControl.LayoutTransform>
<ScaleTransform ScaleY="-1" />
</ItemsControl.LayoutTransform>
<ItemsControl.Template>
<ControlTemplate>
<ScrollViewer Focusable="False" Padding="{TemplateBinding Control.Padding}">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
</ScrollViewer>
</ControlTemplate>
</ItemsControl.Template>
...
</ItemsControl>
每个 DataTemplate 都有类似的转换,因此文本看起来正确。
由此产生的一个问题是滚动反转。反正有反转滚动方向吗?或者以某种方式自己进行计算,而不是默认的滚动行为。我怎样才能做到这一点?
【问题讨论】: