ScrollBar.ViewportSize Property

Gets or sets the amount of the scrollable content that is currently visible.

Namespace:  System.Windows.Controls.Primitives
Assembly:  System.Windows (in System.Windows.dll)

public double ViewportSize { get; set; }
<ScrollBar ViewportSize="double"/>

Property Value

Type: System.Double
The amount of the scrollable content that is currently visible. The default is 0.

Dependency property identifier field: ViewportSizeProperty

The units that are used for ViewportSize are the same units that are used to describe the length of the content. Some examples include lines of text or pages of text.

The value of the ViewportSize property is used to calculate the size of the Thumb control that is displayed as the sliding value indicator in a ScrollBar control. The Thumb control has a minimum size that is defined by the operating system. The size of a Thumb control becomes larger as more content is visible. The size of a Thumb control represents the amount of content that is visible. For example, if 25 percent of a Thumb control's content is visible, the control occupies 25 percent of the track in which it moves.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

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

Community Additions

ADD
Show: