1

One of the disadventage I found in WPF is it doesnot have a Numeric UpDown control. So I make a listbox with height as 25 so that it will display only one item at a time and the vertical scroll feels like a UpDown controls. My problem is when I use the scroll to change the value, I can't get the current value shown in listbox. Can any idea to get the value shown in listbox without selecting it?

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
Sauron
  • 16,668
  • 41
  • 122
  • 174
  • There's a similar question - http://stackoverflow.com/questions/382676/good-numericupdown-equivalent-in-wpf – Helen Jun 03 '09 at 10:47

4 Answers4

2

The Extented WPF Toolkit has one: NumericUpDown enter image description here

2

Though there's no standard WPF NumericUpDown, you can try NumericUpDown Custom Control with Theme and UI Automation Support Sample.

Helen
  • 87,344
  • 17
  • 243
  • 314
1

well since you are using WPF, you can change the template of your ListBoxItem and change it's look to nothing when the item is selected ( i mean remove the trigger ), that's all.
I hope it's helpful, unless you need other things than this.

abdelkarim
  • 586
  • 6
  • 11
1

You can also attach a ScrollBar.Scroll event. This fires when you scroll. Maybe you can then change the SelectedIndex manually or set the focus?

rudigrobler
  • 17,045
  • 12
  • 60
  • 74