Skip to main content
Home Forums Silverlight Design Designing with Silverlight [ScrollContentPresenter] , [ScrollViewer], [ScrollBar] significance?
2 replies. Latest Post by surbhiydv on September 24, 2008.
(0)
Abhi319
Member
122 points
52 Posts
09-04-2008 1:58 AM |
Hello!
I am Working on silverlight and I want to know the exact significance and usage of these three component :
[ScrollContentPresenter] , [ScrollViewer], [ScrollBar]
I want to know the Exact area of use, diffrence among thses three and How to use these component in a project. Means the proper significance of these controls.
Thanks in Advance
Silverli...
Participant
1133 points
193 Posts
09-04-2008 2:39 AM |
Hi,
ScrollContentPresenter: Displays the content of a ScrollViewer control. See MSDN: http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollcontentpresenter(VS.95).aspx
ScrollViewer: Represents a scrollable area that can contain other visible elements. See MSDN: http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollviewer(VS.95).aspx
ScrollBar: Represents a control that provides a scroll bar that has a sliding Thumb whose position corresponds to a value. See MSDN: http://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.scrollbar(VS.95).aspx
surbhiydv
1134 points
218 Posts
09-24-2008 7:26 AM |
Hi Abhi
-------------"The ScrollBar control provides a flexible implementation of a scrollbar that you can use for any number of purposes, not just scrolling content. In essence, it is Slider control with RepeatButtons automatically rendered on either end of the track.
The ScrollViewer, is more focused on delivering support for scrolling content. It is actually composed with ScrollBar controls internally, so it is not adding any new scrolling features that the ScrollBar doesn't offer. In fact, the ScrollViewer loses a few important features, like the ScrollBar's usefull Scroll event.
ScrollBar exposes a few important properties that enable you to control scrolling behavior. The properties are very similar to those on the Slider control, such as Maximum, Minimum, LargeChange, SmallChange, and Orientation. The size of ScrollBar steps when clicked (large steps occur when the track is clicked, small steps when the buttons are clicked), and the Horizontal or Vertical orientation of the ScrollBar. ViewportSize property allows you to tell the ScrollBar how much of the scrollable "content" is visible so that the "thumb" can be sized appropriately. The larger that you make the ViewportSize value, the wider the thumb will be.
The ScrollBar also exposes two helpful events: OnScroll and OnValueChanged. Both of these events allow you to respond to user interaction with the ScrollBar and both are missing in the ScrollViewer control by default."-----------------
hope the above information will help you.
(Please 'Mark as Answer'................if it helps you)