Reputation: 22926
I'm creating a scrollbar in codebehind like so:
ScrollBar b = new ScrollBar();
Grid ScrollbarGrid = GetTemplateChild( "ScrollbarGrid" ) as Grid;
b.Orientation = Orientation.Horizontal;
ScrollbarGrid.Children.Add(b);
What I need is for the scrollbar handle to be of a size I set myself if that is at all possible?
Upvotes: 3
Views: 2044
Reputation: 7958
You can use ViewportSize
like b.ViewportSize = 5;
take a look at here for more information.
and MSDN's Track Class how thumb size calculates
Upvotes: 3
Reputation: 21015
You can set the Height and Width property of the scroll bar, is this what you need ?
Upvotes: 0