Track::Thumb Property
Namespace: System.Windows.Controls.Primitives
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> <object.Thumb> <Thumb .../> </object.Thumb> </object>
Property Value
Type: System.Windows.Controls.Primitives::ThumbThe 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:
ThumbSize
The size of the Thumb control in the same units as the TrackLength.
TrackLength
The length of the Track.
ViewportSize
The size of the scrollable area that is visible in the content units, such as the number of pages of a document.
Maximum
The maximum value of the content in content units, such as page 10 of a 10-page document.
Minimum
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.

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" IsDirectionReversed="true"> <Track.DecreaseRepeatButton> <RepeatButton Style="{DynamicResource ScrollBar_UpTrack}"/> </Track.DecreaseRepeatButton> <Track.Thumb> <Thumb Style="{DynamicResource ScrollBar_HorizontalThumb}"/> </Track.Thumb> <Track.IncreaseRepeatButton> <RepeatButton Style="{DynamicResource ScrollBar_DownTrack}"/> </Track.IncreaseRepeatButton> </Track>
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.