Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top