NumberBox
Description
NumberBox is a WPF Control for numeric entry with optional spin buttons and bounds.
Example usage
- XAML
- C#
<fluence:NumberBox Header="Inline" Value="5" Minimum="0" />
var number = new Fluence.Wpf.Controls.NumberBox { Value = 5, Minimum = 0 };
Key properties
| Property | Default | Purpose |
|---|---|---|
Value | 0 | Current numeric value. |
Minimum, Maximum | double.MinValue, double.MaxValue | Bounds for the value. |
SmallChange, LargeChange | 1, 10 | Step sizes for adjustment. |
SpinButtonPlacementMode | Compact | Controls where spin buttons appear. |
AcceptsExpression | false | Enables arithmetic expression input. |
State and behavior
Spin buttons and text entry change Value within the configured bounds. Text that does not parse leaves Value unchanged, and clearing the field sets Value to NaN. When the control is disabled, its header uses the disabled text brush.
Events
ValueChanged is raised when the value changes.
Related
See text input focus and selection for the shared WPF editor behavior.