有没有想过WPF ScrollViewer可以让它像Android一样平滑滚动?

有没有想过WPF ScrollViewer可以让它像Android一样平滑滚动?,android,wpf,scroll,scrollviewer,smooth,Android,Wpf,Scroll,Scrollviewer,Smooth,我在xaml中尝试了一个简单的ScrollViewer,如下所示: <ScrollViewer Height="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type StackPanel}}, Path=Height}" ScrollViewer.VerticalScrollBarVisibility="Visible" CanContentScroll="True">

我在xaml中尝试了一个简单的ScrollViewer,如下所示:

<ScrollViewer Height="{Binding RelativeSource={RelativeSource FindAncestor, 
     AncestorType={x:Type StackPanel}}, Path=Height}" ScrollViewer.VerticalScrollBarVisibility="Visible" CanContentScroll="True">
         <DockPanel>
             <StackPanel Name="StackPanel1" OverridesDefaultStyle="False" Width="230" Height="803"
                 VerticalAlignment="Top" HorizontalAlignment="Left" Margin="23,1,0,0">
             ....Something here
             ....Something here
             ....Something here
             </StackPanel>
         </DockPanel>
</ScrollViewer>

……这里有些东西
……这里有些东西
……这里有些东西
但我的问题是..我们有没有可能像任何使用WPF的android或iphone一样创建平滑的滚动


有什么想法吗?

你需要自己处理MouseDown、MouseUp、MouseMove事件,或者我想象中的适当触摸事件


顺便说一句,你为什么要使用相对资源来获取父对象的高度。您不能将滚动查看器设置为填充父对象吗?

我还计划从MouseDown、MouseUp、MouseMove事件开始。谢谢分享“米克尔”。我使用RelativeSource来控制滚动条,具体取决于另一个stackpanel的“高度”。