How to increase scrollbar width in WPF ScrollViewer?

Viewed 41304

I am working on a touch screen on a small device and the custom width of the scroll-bar is no good as one of my requirements is that everything needs to be doable by finger gestures.

How can I set the width of the WPF ScrollViewer scrollbar?

Note that I don't wanna change the width of all the scrollbars on the device (doable through windows settings) - only the ones in my app.

4 Answers

And if you don't want to use XAML, you can do it in the Application's constructor, e.g.

using System.Windows;

public partial class App
{
    public App()
    {
        Resources.Add(SystemParameters.VerticalScrollBarWidthKey, 50d);
        Resources.Add(SystemParameters.HorizontalScrollBarHeightKey, 50d);
    }
}
Related