我有一个问题:我在我的XAML/C#应用程序中有一个ScrollViewer,里面有一个包含动态列数的Grid。当程序加载时,我在代码中设置ColumnDefenitions。但是当我尝试在ScrollViewer中滚动这个Grid时, scrollViewer.ScrollToHorizontalOffset(myOffset); 它目前是瞬间滚动的,但我想让它在一段时间内平滑地滚动。请问我该怎么做?
它可以通过使用Storyboard来实现,参见以下示例(即使适用于Windows Phone 8): http://blogs.msdn.com/b/delay/archive/2009/08/04/scrolling-so-smooth-like-the-butter-on-a-muffin-how-to-animate-the-horizontal-verticaloffset-properties-of-a-scrollviewer.aspx 编辑: 新链接:http://dlaa.me/blog/post/9857745(备份)
myOffset
的值是多少?你有多少列?动态(dinamic)具体是什么意思? - Security Hound