Implements numeric up down WPF controls to edit/display values (byte, integer, short, ushort etc.) with a textbox and optional up/down arrow (repeat) buttons. Value editing is possible by dragging the mouse vertically/horizontally, clicking up/down buttons, using up/down or left right cursor keys, spinning mousewheel on mouseover, or editing the textbox.
MIT License
This release has been authored by Jรผrgen Holzer ๐
This release has been authored by heartacker ๐
This release has been authored by Jรผrgen Holzer ๐
WaterMark support Use the Watermark binding to display a default string (when the user deletes all characters in the textbox portion) to hint at the expected input format.
add support command binding Use the new Command binding to process the event when the user clicks on the Up/Dowm button of the UpDown Control.
This release has been authored by heartacker and Ryan Weldin ๐
addr support update value when lostfocus,Fixes #36 #38
Please use the IsUpdateValueWhenLostFocus
property.
support align the value to left/center/right #41
Please use the HorizontalContentAlignment
property.
add support to force trigger the ValueChanged event with ctrl+enter #39 Please use Control+Enter to trigger a value changed event without having to actually change a value. This shortcut cannot be configured out.
support disable editingTip Fixes #37 #43
Please use the EnableValidatingIndicator
property.
fix: the cursor will focus to the PART_Measuring_Element by mistake #44
This release has been authored by heartacker ๐
Display and Edit of Hex values
Text portion editing can be:
The Edit TextBox displays during editing a Red or Green indicator (in upper left corner) depending on whether current text is:
Dependency Features Added:
Improved Style/Template
Thanx for contributing go to heartacker ๐
This library implements numeric up down WPF controls to edit a value:
Each control implementation is specific for a certain .Net data type:
Data Type | Control |
---|---|
byte | ByteUpDown control |
decimal | DecimalUpDown control |
double | DoubleUpDown control |
float | FloatUpDown control |
integer | IntegerUpDown control |
long | LongUpDown control |
sbyte | SbyteUpDown control |
short | ShortUpDown control |
ushort | UshortUpDown control |
uint | UintUpDown control |
ulong | UlongUpDown control |
Percentages can be edit at [0-100] while backend viewmodels handles [0-1] values, see FactorToDoubleConverter and PercentageUpDownDemo in demo clients at project site.
Controls are fully themeable. Project site contains demos for:
More Features:
There are mouse and keyboard input methods that support 2 different configurable increment/decrement values.
The user can hover the mouse over the textbox portion of the control and:
to change the current value with the size configured in StepSize or LargeStepSize dependency property.
The user can hover the mouse over the textbox portion and spin the mouse wheel with:
to change the current value with the size configured in StepSize or LargeStepSize dependency property.
The modifier key for changing the value with LargeStepSize can be configured in the MouseWheelAccelaratorKey dependency property.
The user can click into the textbox portion of the control and:
to change the current value with the size configured in StepSize or LargeStepSize dependency property.
There is a demo application that shows the usage of the control (Light/Black themes enabled) and documents the features, such as, the ability to configure a minimum and maximum value that can be used to keep the resulting value within a given bound.
Load Light or Dark brush resources in you resource dictionary to take advantage of existing definitions.
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/NumericUpDownLib;component/Themes/DarkBrushs.xaml" />
</ResourceDictionary.MergedDictionaries>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/NumericUpDownLib;component/Themes/LightBrushs.xaml" />
</ResourceDictionary.MergedDictionaries>
These definitions do not theme all controls used within this library. You should use a standard theming library, such as:
to also theme standard elements, such as, button and textblock etc.
Visit the project's Wiki for more details.