Pages

Wednesday, May 19, 2010

ScrollViewer Scroll Change Event in Silverlight

Today i was working with scrollviewer and surprisingly i did not found a scroll changed event... really got irritated and tried to find a workaround for that and would love to share with you all.
I found two workarounds and the good thing is both of them work :) and are mentioned below.

1st: Catch the scrollbar controls inside the scrollviewer control template and use the scroll event of scrollbar control.

2nd: Create a dependency property which listens the change of Offset properties of ScrollViewer

Here is the sample project created and would be straight forward and is self-explanatory.

2 comments:

  1. Hey thanks Kranthi Kiran. Your sample is great!

    ReplyDelete
  2. That is just AWESOME, thank you so much!

    Kudos!
    Richard
    http://www.electricscribes.com

    ReplyDelete