我想扩展ScrollViewer以添加一些依赖属性,以便使用Storyboard动画水平和垂直偏移量,如下所示:How do I add an extended class ScrollViewer to the XAML file?
碰巧ScrollViewer类是密封的。
有什么办法可以实现我的目标吗?
发布于 2014-02-14 03:21:37
经过大量的研究,我找到了解决问题的方法。它被称为附加依赖属性。您可以在http://dotnetbyexample.blogspot.pt/2010/05/attached-dependency-properties-for.html中看到如何创建它。
在那之后,直接使用这个依赖属性和故事板来创建我的平滑滚动查看器。
https://stackoverflow.com/questions/21699672
复制相似问题