C# – ListBox as Numeric UpDown control in WPF


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?

Best Solution

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

Related Question