ScrollBar::ViewportSize Property
Gets or sets the amount of the scrollable content that is currently visible.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
<object ViewportSize="double" .../>
Property Value
Type: System::DoubleThe amount of the scrollable content that is currently visible. The default is 0.
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's size represents the amount of a ScrollViewer control's content that is visible. If 25 percent of a ScrollViewer control's content is visible, the Thumb occupies 25 percent of the track in the ScrollBar.
You can decide which units ViewportSize uses. When you set this property, make sure that the ViewportSize, Minimum, Maximum, and Value properties use the same units.
The following illustration shows how the Thumb size reflects the amount of content that is visible.

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.