문제

I want to extend ScrollViewer to add some Dependency Properties in order to use Storyboard to animate Horizontal and Vertical Offsets as shown here: How do I add an extended class ScrollViewer to the XAML file?

It happens that ScrollViewer class is sealed.

Is there any workaround to accomplish my goal?

도움이 되었습니까?

해결책

After a lot research I found a clean solution for my problem. And it's called attached dependency property. You can see in http://dotnetbyexample.blogspot.pt/2010/05/attached-dependency-properties-for.html how to create it.

After that it was pretty straight to use that dependency property with storyboard to create my smooth scrollviewer.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top