ScrollBar Mode

7 Apr 2021 / 1 minute to read

The SfSkinManager helps to apply various scrollbar styles for both syncfusion and framework controls using ScrollBarMode property which will be available only in 13 themes supported from theme studio.

The ScrollBarMode enum has below values,

  • Default - The ScrollBar will be displayed with default look of thumb along with up/down arrow to scroll.
  • Compact - The window 10 like compact scrollbar will have look of thin layer of thumb until user hover the scrollbar area.

NOTE

The Compact scrollbar mode is enabled by default in fluent theme.

WPF SfSkinManager ScrollBarMode

WPF SfSkinManager ScrollBarMode gif

Change scrollbar mode

The scrollbar mode can be changed using ScrollBarMode property available in Themes class.

public partial class MainWindow : ChromelessWindow
{
    public MainWindow()
    {
        SfSkinManager.SetTheme(this, new Theme() { ThemeName = "MaterialDark", ScrollBarMode = ScrollBarMode.Compact });
        InitializeComponent();            
    }        
}

NOTE

View sample in GitHub.