Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight 3
ScrollBar Class

  Switch on low bandwidth view
This page is specific to
Microsoft Silverlight 3

Other versions are also available for the following:
.NET Framework Class Library for Silverlight
ScrollBar Class

Represents a control that provides a scroll bar that has a sliding Thumb whose position corresponds to a value.

Namespace:  System.Windows.Controls.Primitives
Assembly:  System.Windows (in System.Windows.dll)
Visual Basic (Declaration)
<TemplatePartAttribute(Name := "HorizontalLargeIncrease", Type := GetType(RepeatButton))> _
<TemplatePartAttribute(Name := "HorizontalSmallIncrease", Type := GetType(RepeatButton))> _
<TemplateVisualStateAttribute(Name := "Disabled", GroupName := "CommonStates")> _
<TemplatePartAttribute(Name := "VerticalSmallIncrease", Type := GetType(RepeatButton))> _
<TemplatePartAttribute(Name := "HorizontalRoot", Type := GetType(FrameworkElement))> _
<TemplatePartAttribute(Name := "HorizontalLargeDecrease", Type := GetType(RepeatButton))> _
<TemplatePartAttribute(Name := "HorizontalSmallDecrease", Type := GetType(RepeatButton))> _
<TemplatePartAttribute(Name := "HorizontalThumb", Type := GetType(Thumb))> _
<TemplatePartAttribute(Name := "VerticalRoot", Type := GetType(FrameworkElement))> _
<TemplatePartAttribute(Name := "VerticalLargeIncrease", Type := GetType(RepeatButton))> _
<TemplatePartAttribute(Name := "VerticalLargeDecrease", Type := GetType(RepeatButton))> _
<TemplateVisualStateAttribute(Name := "MouseOver", GroupName := "CommonStates")> _
<TemplatePartAttribute(Name := "VerticalSmallDecrease", Type := GetType(RepeatButton))> _
<TemplatePartAttribute(Name := "VerticalThumb", Type := GetType(Thumb))> _
<TemplateVisualStateAttribute(Name := "Normal", GroupName := "CommonStates")> _
Public NotInheritable Class ScrollBar _
    Inherits RangeBase
Visual Basic (Usage)
Dim instance As ScrollBar
C#
[TemplatePartAttribute(Name = "HorizontalLargeIncrease", Type = typeof(RepeatButton))]
[TemplatePartAttribute(Name = "HorizontalSmallIncrease", Type = typeof(RepeatButton))]
[TemplateVisualStateAttribute(Name = "Disabled", GroupName = "CommonStates")]
[TemplatePartAttribute(Name = "VerticalSmallIncrease", Type = typeof(RepeatButton))]
[TemplatePartAttribute(Name = "HorizontalRoot", Type = typeof(FrameworkElement))]
[TemplatePartAttribute(Name = "HorizontalLargeDecrease", Type = typeof(RepeatButton))]
[TemplatePartAttribute(Name = "HorizontalSmallDecrease", Type = typeof(RepeatButton))]
[TemplatePartAttribute(Name = "HorizontalThumb", Type = typeof(Thumb))]
[TemplatePartAttribute(Name = "VerticalRoot", Type = typeof(FrameworkElement))]
[TemplatePartAttribute(Name = "VerticalLargeIncrease", Type = typeof(RepeatButton))]
[TemplatePartAttribute(Name = "VerticalLargeDecrease", Type = typeof(RepeatButton))]
[TemplateVisualStateAttribute(Name = "MouseOver", GroupName = "CommonStates")]
[TemplatePartAttribute(Name = "VerticalSmallDecrease", Type = typeof(RepeatButton))]
[TemplatePartAttribute(Name = "VerticalThumb", Type = typeof(Thumb))]
[TemplateVisualStateAttribute(Name = "Normal", GroupName = "CommonStates")]
public sealed class ScrollBar : RangeBase
XAML Object Element Usage
<ScrollBar .../>

The ScrollBar control consists of a Thumb control and two RepeatButton controls. You can increase and decrease the RangeBase..::.Value property of the ScrollBar control by pressing the RepeatButton controls or by moving the Thumb. The default range of values for the RangeBase..::.Value property is from 0 to 10. The RangeBase..::.Value represents the linear distance of the Thumb between the endpoints of the ScrollBar. You can change the default range of values by setting the RangeBase..::.Minimum and RangeBase..::.Maximum properties. The Orientation property determines whether the ScrollBar is displayed horizontally or vertically.

The scroll track in a ScrollBar is oriented so that values increase from top to bottom for a vertical ScrollBar or from left to right for a horizontal ScrollBar.

For a list of the initial property values for an instance of the ScrollBar class, see the ScrollBar()()() constructor.

To display content inside a box that has scrollbars, use the ScrollViewer control.

System..::.Object
  System.Windows..::.DependencyObject
    System.Windows..::.UIElement
      System.Windows..::.FrameworkElement
        System.Windows.Controls..::.Control
          System.Windows.Controls.Primitives..::.RangeBase
            System.Windows.Controls.Primitives..::.ScrollBar
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker