Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - ScrollViewer: how set SmallChange value

 
 
Old 06-01-2007   #1 (permalink)
condor


 
 

ScrollViewer: how set SmallChange value

on system.windows.form the SmallChange value is set as:
scrollableControl.HorizontalScroll.SmallChange = 50

how can i do it the same on WPF System.Windows.Controls.ScrollViewer?

The ScrollViewer control encapsulates ScrollBar the ScrollBar a
RangeBase.SmallChange, bud how can i set this values?

thanks
anton

My System SpecsSystem Spec
Old 06-06-2007   #2 (permalink)
condor


 
 

RE: ScrollViewer: how set SmallChange value

i have found the solution to set the SmallChange
ScrollBar sb = MyScrollViewer.Template.FindName("PART_VerticalScrollBar",
scrollMy) as scrollBar;
sb.Maximum = 600;
sb.SmallChange = sb.Maximum / 20;
BUT...!!!
sb.SmallChange can set now bat have no effect on scrollbar
however sb.Maximum is function correcly.

My problem is that i need fixed size (30 pixel) when scrolling with scroll
button.

have anybody an idea why SmallChange have no effect
or make it otherwise.

thanks
anton


My System SpecsSystem Spec
Old 06-06-2007   #3 (permalink)
condor


 
 

RE: ScrollViewer: how set SmallChange value

i have found a solution to set the SmallChange value
double d = 30.0;
ScrollBar sb = MyScroll.Template.FindName("PART_VerticalScrollBar",
MyScroll) as ScrollBar;
sb.SetValue(ScrollBar.SmallChangeProperty, d);
or
sb.SmallChange = d;

BUT!....

sb.SmallChange or sb.SetValue(..) don't have effect
where sb.Maximum = 100 is work correctly.

have anybody an idea why?

my problem is that the scrollbar should have a fixed scrolling size when
click on scrobar because my lines are 30 pixel height.

thanks
anton



My System SpecsSystem Spec
 

Thread Tools



Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46