Saturday, 15 May 2010

xaml - Nonlinear WPF Slider values -



xaml - Nonlinear WPF Slider values -

it straightforward remap linear values returned wpf slider control:

public double multiplier { { switch ((int)slidermultiplier.value) { case 0: homecoming 0.1; case 1: homecoming 0.2; case 2: homecoming 0.5; case 3: homecoming 1; case 4: homecoming 2; case 5: homecoming 5; case 6: homecoming 10; default: throw new argumentoutofrangeexception(); } } }

but slider handle, while beingness dragged, accompanied tooltip showing selected value - unmapped linear value. how can supply remapped value display? or slider supply non-linear values directly?

somebody else has solved (as far tooltips concerned). couldn't find way of having slider study non-linear value range.

http://joshsmithonwpf.wordpress.com/2007/09/14/modifying-the-auto-tooltip-of-a-slider/

wpf xaml slider

No comments:

Post a Comment