Recommended

More from Silverlight Show

Skip Navigation LinksHome / News / View News

Exposing and Binding to a Silverlight ScrollViewer’s Scrollbars

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on Jul 22, 2010
(0 votes)
In this post, Colin Eberhardt talks about the Silverlight ScrollViewer and demonstrates a simple attached behaviour that exposes the current vertical and horizontal scroll offsets as read / write dependency properties allowing them to be bound to.

The Silverlight ScrollViewer is a very useful control, if you have some content that is larger than the space available in your application, just sit it inside a ScrollViewer and it will automatically add vertical or horizontal scrollbars as required. Simple.

The ScrollViewer exposes readonly properties which indicate the current vertical and horizontal scroll offset. I have been used a ScrollViewer on many occasions without finding this to be an issue, however, recently I was creating an MVVM application which contained a list of items within a ScrollViewer.

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 5 and 7 and type the answer here:

Did you notice our new Silverlight-based Showcase section ? Check it out to get a bird's eye view of all showcases featured on SilverlightShow, with a quick thumbnail preview for easier browsing. Want to view the most recent showcases only? Use Group by Month option for a chronological listing.
This is the second redesigned, entirely Silverlight-based section in SilverlightShow, after the new Books section. We look forward to your feedback on both! (hide this)