Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

ScrollViewer: how set SmallChange value

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 06-01-2007   #1 (permalink)
condor
Guest


 

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
Guest


 

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
Guest


 

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
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
ScrollViewer breaks my WrapPanel steve Avalon 3 04-06-2007 06:27 PM
I can't get set HorizontalOffset on a ScrollViewer (bug in Nov CTP?) Philippe Lavoie Avalon 2 01-10-2006 03:52 PM


Vistax64.com 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 2005-2008

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 47 48 49 50 51