Customize scrollbar size?

I create a scrollbar in codebehind as follows:

     ScrollBar b = new ScrollBar();
     Grid ScrollbarGrid = GetTemplateChild( "ScrollbarGrid" ) as Grid;
     b.Orientation = Orientation.Horizontal;
     ScrollbarGrid.Children.Add(b);

What do I need so that the scrollbar descriptor has the size that I set myself, if at all possible?

+3
source share
2 answers

You can use ViewportSize

like b.ViewportSize = 5;

Look here for more information.

and MSDN Track Class how thumb size is calculated

+3
source

You can set the Height and Width of the scroll bar property, is that what you need?

0
source

All Articles