--- title: "How to: Customize the Thumb Size on a ScrollBar" description: Learn how to customize the Thumb Size on a ScrollBar. ms.date: "03/30/2017" ms.custom: devdivchpfy22 helpviewer_keywords: - "ScrollBar control [WPF]" - "customizing thumb size [WPF]" - "thumb size [WPF]" ms.assetid: fa32b866-5ca1-4e73-85e7-2ac64b80d194 --- # How to: Customize the Thumb Size on a ScrollBar This topic explains how to set the of a to a fixed size and how to specify a minimum size for the of a . ## Create a ScrollBar with a fixed Thumb size The following example creates a that has a with a fixed size. The example sets the property of the to and sets the height of the . To create a horizontal with a that has a fixed width, set the width of the . [!code-xaml[ScrollBarCustomThumbSize#1](~/samples/snippets/csharp/VS_Snippets_Wpf/ScrollBarCustomThumbSize/CS/Window1.xaml#1)] ## Create a ScrollBar with a minimum Thumb size The following example creates a that has a with a minimum size. The example sets the value of . To create a horizontal with a that has a minimum width, set the . [!code-xaml[ScrollBarCustomThumbSize#2](~/samples/snippets/csharp/VS_Snippets_Wpf/ScrollBarCustomThumbSize/CS/Window1.xaml#2)] ## See also - [ScrollBar Styles and Templates](scrollbar-styles-and-templates.md)