質問

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