(X) Hide this
    • Login
    • Join
      • Say No Bots Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

Tip: How to make a control scroll its content?

(1 votes)
Denislav Savkov
>
Denislav Savkov
Joined Feb 11, 2008
Articles:   14
Comments:   6
More Articles
1 comments   /   posted on Sep 02, 2008
Categories:   Controls


There is a special control in Silverlight responsible for scrolling of content. The full name of this control is System.Windows.Controls.ScrollViewer. You can use it like a regular container by placing all of the content you want to scroll inside of it. The control's properties that worth mentioning are two: HorizontalScrollBarVisibility and VerticalScrollBarVisibility. As you can guess they allow you to control the visibility of the vertical and horizontal scrollbars. The possible values are Auto, Disabled, Hidden and Visible.

Xaml

<ScrollViewer x:Name="scroller" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
    <Image x:Name="scrollableImage" Source="SomeImage.jpg" Height="1000" Width="1000" />
</ScrollViewer>

That's it!

 


Subscribe

Comments

  • dasari_ramacharan

    Re: Tip: How to make a control scroll its content?


    posted by dasari_ramacharan on Jul 27, 2011 20:59
    thats a quick help! thanks

Add Comment

Login to comment:
  *      *       
Login with Facebook