7

Closed

NumericUpDown Hide Spinner

description

A spinner visiblity property would be nice, this box is pretty useful as a number edit box (without spinner).
Closed Aug 11, 2012 at 12:00 AM by RohanTha
Bulk closing issues older than 2 years. Please reactivate if you still have this problem.

comments

ningz wrote Nov 14, 2008 at 5:54 PM

The beauty of WPF/SL model is that logic and VI are separated. You can remove the spinner template part easily: open your page with a NumericUpDown in blend, select the numericupdown, right click and select "Edit Control Parts (Template) -> Edit a copy, navigate down the path of Template -> Grid -> Border -> Grid, select and delete Spinner, then here goes your number edit box, ie, a NumericUpDown without spinner. All NumericUpDown property and functions are still there: you can still set min/max/value/increment etc, using up/down cursor key inside the textbox will increase/decrease the value as if you are clicking on the repeatbutton, and coercion will happen too: as soon as you tab away, the number is coerced to be in the range of min/max. hope this helps.

ningz wrote Nov 16, 2008 at 4:05 AM

** Closed by ningz 11/14/2008 10:55 AM

JustinJosefAngel wrote Nov 16, 2008 at 4:05 AM

moadib2k wrote Nov 19, 2008 at 10:55 PM

Thats my biggest complaint with silverlight and wpf. I agree, I could spend 20-30 minutes figuring out the template and then how to turn off the part I dont want. Or... the designer could put a showspinner template property. so i could just say showtemplate = false.

devenshah1974 wrote Apr 24, 2009 at 9:24 AM

Is there a way we can achieve this with AutoComplete in SL3. I tried to hide the spinner or set opacity to 0, but it appiles the setting to the whole control.

Thanks

JustinJosefAngel wrote Apr 25, 2009 at 12:47 AM

This is currently possible in NumericUpDown via changing the NumericUpDown.SpinnerStyle and the default template of the spinner.

See Ning's blog post for more details and a plethora of possible SpinnerStyle suggestions:
http://www.ningzhang.org/2008/11/19/customize-silverlight-toolkit-controls-numericupdown/