This documentation is archived and is not being maintained.

Track.Thumb Property

Gets the Thumb control that is used to change the Value of a Track.

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

Public Property Thumb As Thumb
Dim instance As Track 
Dim value As Thumb 

value = instance.Thumb

instance.Thumb = value
    <Thumb .../>

Property Value

Type: System.Windows.Controls.Primitives.Thumb
The Thumb control that is used with the Track. The default is a Thumb control that has default settings.

The placement of the Thumb control corresponds to the Value of the Track control. The size of the Thumb control in a Track control reflects the amount of content that is currently visible. The size of the Thumb control of the Track is computed in the following ways:

  • If the ViewportSize property is not specified, the size of the Thumb is a fixed default value. This is how the Thumb of a Track functions inside a Slider control.

  • If the ViewportSize property is specified and the size of the content is greater than the ViewportSize, the following formula is used:

    ThumbSize = TrackLength * ViewportSize / (Maximum Minimum + ViewportSize)

    Where the parameters are defined as follows:


    The size of the Thumb control in the same units as the TrackLength.


    The length of the Track.


    The size of the scrollable area that is visible in the content units, such as the number of pages of a document.


    The maximum value of the content in content units, such as page 10 of a 10-page document.


    The minimum value of the content in content units, such as page 1 of a document.

    The following illustration shows a visual representation of some of these parameters in a ScrollBar control.

    Viewport size, thumb size, and track length
  • If the size of the content is less than a ViewportSize, the Thumb does not appear and the Visibility property of Thumb is set to false.

The minimum sizes for a Thumb control are determined by two system parameters, VerticalScrollBarButtonHeight and HorizontalScrollBarThumbWidth. The minimum size for a Thumb control in a vertical Track is 1/2 * VerticalScrollBarButtonHeight and the minimum size for a Thumb control in a horizontal Track is 1/2 * HorizontalScrollBarThumbWidth.

The following example shows how the Thumb style is defined inside the ScrollBar ControlTemplate when the Orientation property is Vertical.

<Track Grid.Row="1" Name="PART_Track"
    <RepeatButton Style="{DynamicResource ScrollBar_UpTrack}"/>
    <Thumb Style="{DynamicResource ScrollBar_HorizontalThumb}"/>
    <RepeatButton Style="{DynamicResource ScrollBar_DownTrack}"/>

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0