Custom Scrollbars in WPF

I was recently working on a WPF User Control which made use of a ScrollViewer, but I found that the scrollbars were hogging too much space in my control. I wanted to modify the scrollbars to be a little bit narrower. Because of the way WPF was designed, you can create ControlTemplates to change the default look and feel of controls.

I found a good ScrollBar Template Example on MSDN, and used this as my starting point. .

Within the template, I only adjusted a few width and height properties and ended up with much slimmer scrollbars. .

These images show the difference in scrollbars from the big ol' default scrollbars to the slimmer version. .

You can download my sample project here.

Comments...

Like to leave a comment ?


Title

Comment

Name