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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With