# NumberBox

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/struct-numberbox/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
struct NumberBox
```

A text box for numbers (WinUI's `NumberBox`): a value of type `f64`, NaN when the box is
empty, with a range, steps, wrapping, expressions and spin buttons.

The text is committed when the box loses the focus, on Enter and before a step: it is parsed
with the `NumberFormatter`, or evaluated as an expression
(`utils::number_expression`) when `AcceptsExpression` is
set. Up and Down (and the spin buttons and the mouse wheel) step by `SmallChange`, PageUp and
PageDown by `LargeChange`; Escape restores the text of the value.

The template is the control theme of the WinUI theme (`Controls/NumberBox.xaml`, from WinUI's
`NumberBox.xaml`), with WinUI's parts: the text box `InputBox`, the spin buttons `UpSpinButton`
and `DownSpinButton`, the popup `UpDownPopup` with `PopupUpSpinButton` and
`PopupDownSpinButton`, and `HeaderContentPresenter`. The control sets WinUI's visual states as
pseudo-classes: `:spinbuttonsvisible` and `:spinbuttonspopup` (SpinButtonStates; neither is
SpinButtonsCollapsed), `:upspinbuttondisabled` and `:downspinbuttondisabled`. The Fluent and
Simple themes have no template for it (docs/porting/winui-controls.md, section 5.1).

Missing (docs/porting/winui-controls.md, Input): `InputScope`, `SelectionFlyout`,
`SelectionHighlightColor`, `TextReadingOrder` and `PreventKeyboardDisplayOnProgrammaticFocus`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L163)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`minimum_property`](#function-minimum_property)
- [`maximum_property`](#function-maximum_property)
- [`value_property`](#function-value_property)
- [`small_change_property`](#function-small_change_property)
- [`large_change_property`](#function-large_change_property)
- [`text_property`](#function-text_property)
- [`header_property`](#function-header_property)
- [`header_template_property`](#function-header_template_property)
- [`placeholder_text_property`](#function-placeholder_text_property)
- [`text_alignment_property`](#function-text_alignment_property)
- [`description_property`](#function-description_property)
- [`validation_mode_property`](#function-validation_mode_property)
- [`spin_button_placement_mode_property`](#function-spin_button_placement_mode_property)
- [`is_wrap_enabled_property`](#function-is_wrap_enabled_property)
- [`accepts_expression_property`](#function-accepts_expression_property)
- [`number_formatter_property`](#function-number_formatter_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`minimum`](#function-minimum)
- [`set_minimum`](#function-set_minimum)
- [`maximum`](#function-maximum)
- [`set_maximum`](#function-set_maximum)
- [`value`](#function-value)
- [`set_numeric_value`](#function-set_numeric_value)
- [`small_change`](#function-small_change)
- [`set_small_change`](#function-set_small_change)
- [`large_change`](#function-large_change)
- [`set_large_change`](#function-set_large_change)
- [`text`](#function-text)
- [`set_text`](#function-set_text)
- [`header`](#function-header)
- [`set_header`](#function-set_header)
- [`header_template`](#function-header_template)
- [`set_header_template`](#function-set_header_template)
- [`placeholder_text`](#function-placeholder_text)
- [`set_placeholder_text`](#function-set_placeholder_text)
- [`text_alignment`](#function-text_alignment)
- [`set_text_alignment`](#function-set_text_alignment)
- [`description`](#function-description)
- [`set_description`](#function-set_description)
- [`validation_mode`](#function-validation_mode)
- [`set_validation_mode`](#function-set_validation_mode)
- [`spin_button_placement_mode`](#function-spin_button_placement_mode)
- [`set_spin_button_placement_mode`](#function-set_spin_button_placement_mode)
- [`is_wrap_enabled`](#function-is_wrap_enabled)
- [`set_is_wrap_enabled`](#function-set_is_wrap_enabled)
- [`accepts_expression`](#function-accepts_expression)
- [`set_accepts_expression`](#function-set_accepts_expression)
- [`number_formatter`](#function-number_formatter)
- [`set_number_formatter`](#function-set_number_formatter)
- [`value_changed`](#function-value_changed)
- [`validate_input`](#function-validate_input)
- [`step_value`](#function-step_value)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L172)

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<NumberBox>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L172)

<a id="function-minimum_property"></a>

### minimum_property

```rust
fn minimum_property() -> &'static StyledProperty<f64>
```

Defines the `Minimum` property: the smallest value. The largest negative `f64` by
default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-maximum_property"></a>

### maximum_property

```rust
fn maximum_property() -> &'static StyledProperty<f64>
```

Defines the `Maximum` property: the largest value. The largest `f64` by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-value_property"></a>

### value_property

```rust
fn value_property() -> &'static StyledProperty<f64>
```

Defines the `Value` property: the number, NaN when the box is empty (the default).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-small_change_property"></a>

### small_change_property

```rust
fn small_change_property() -> &'static StyledProperty<f64>
```

Defines the `SmallChange` property: the step of the arrow keys, the spin buttons and
the mouse wheel. 1 by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-large_change_property"></a>

### large_change_property

```rust
fn large_change_property() -> &'static StyledProperty<f64>
```

Defines the `LargeChange` property: the step of PageUp and PageDown. 10 by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-text_property"></a>

### text_property

```rust
fn text_property() -> &'static StyledProperty<String>
```

Defines the `Text` property: the text of the value. Setting it commits it as input.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-header_property"></a>

### header_property

```rust
fn header_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Defines the `Header` property: the content above the box.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-header_template_property"></a>

### header_template_property

```rust
fn header_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
```

Defines the `HeaderTemplate` property: the template of the header.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-placeholder_text_property"></a>

### placeholder_text_property

```rust
fn placeholder_text_property() -> &'static StyledProperty<String>
```

Defines the `PlaceholderText` property: the text shown while the box is empty.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-text_alignment_property"></a>

### text_alignment_property

```rust
fn text_alignment_property() -> &'static StyledProperty<TextAlignment>
```

Defines the `TextAlignment` property: the alignment of the text. Left by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-description_property"></a>

### description_property

```rust
fn description_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Defines the `Description` property: the content below the box.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-validation_mode_property"></a>

### validation_mode_property

```rust
fn validation_mode_property() -> &'static StyledProperty<NumberBoxValidationMode>
```

Defines the `ValidationMode` property. `InvalidInputOverwritten` by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-spin_button_placement_mode_property"></a>

### spin_button_placement_mode_property

```rust
fn spin_button_placement_mode_property() -> &'static StyledProperty<NumberBoxSpinButtonPlacementMode>
```

Defines the `SpinButtonPlacementMode` property. `Hidden` by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-is_wrap_enabled_property"></a>

### is_wrap_enabled_property

```rust
fn is_wrap_enabled_property() -> &'static StyledProperty<bool>
```

Defines the `IsWrapEnabled` property: whether a step past one end of the range goes
to the other end. `false` by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-accepts_expression_property"></a>

### accepts_expression_property

```rust
fn accepts_expression_property() -> &'static StyledProperty<bool>
```

Defines the `AcceptsExpression` property: whether the text is evaluated as an
arithmetic expression. `false` by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-number_formatter_property"></a>

### number_formatter_property

```rust
fn number_formatter_property() -> &'static StyledProperty<Rc<dyn INumberBoxNumberFormatter>>
```

Defines the `NumberFormatter` property: the formatter of the value and parser of the
text. `InvariantNumberBoxNumberFormatter` by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L387)

<a id="function-construct"></a>

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L511)

<a id="function-new"></a>

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L522)

<a id="function-minimum"></a>

### minimum

```rust
fn minimum(self: &Self) -> f64
```

Gets the smallest value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L527)

<a id="function-set_minimum"></a>

### set_minimum

```rust
fn set_minimum(self: &Self, value: f64)
```

Sets the smallest value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L532)

<a id="function-maximum"></a>

### maximum

```rust
fn maximum(self: &Self) -> f64
```

Gets the largest value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L537)

<a id="function-set_maximum"></a>

### set_maximum

```rust
fn set_maximum(self: &Self, value: f64)
```

Sets the largest value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L542)

<a id="function-value"></a>

### value

```rust
fn value(self: &Self) -> f64
```

Gets the value: NaN when the box is empty.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L547)

<a id="function-set_numeric_value"></a>

### set_numeric_value

```rust
fn set_numeric_value(self: &Self, value: f64)
```

Sets the value (WinUI's `Value` setter). Setting NaN while the value is NaN does nothing:
"we are using nan as a value to represent value not set (cleared)", and NaN is not equal to
itself.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L554)

<a id="function-small_change"></a>

### small_change

```rust
fn small_change(self: &Self) -> f64
```

Gets the step of the arrow keys, the spin buttons and the mouse wheel.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L561)

<a id="function-set_small_change"></a>

### set_small_change

```rust
fn set_small_change(self: &Self, value: f64)
```

Sets the step of the arrow keys, the spin buttons and the mouse wheel.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L566)

<a id="function-large_change"></a>

### large_change

```rust
fn large_change(self: &Self) -> f64
```

Gets the step of PageUp and PageDown.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L571)

<a id="function-set_large_change"></a>

### set_large_change

```rust
fn set_large_change(self: &Self, value: f64)
```

Sets the step of PageUp and PageDown.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L576)

<a id="function-text"></a>

### text

```rust
fn text(self: &Self) -> String
```

Gets the text of the value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L581)

<a id="function-set_text"></a>

### set_text

```rust
fn set_text(self: &Self, value: impl Into<String>)
```

Sets the text; it is committed as input.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L586)

<a id="function-header"></a>

### header

```rust
fn header(self: &Self) -> Option<BoxedValue>
```

Gets the header.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L591)

<a id="function-set_header"></a>

### set_header

```rust
fn set_header(self: &Self, value: Option<BoxedValue>)
```

Sets the header.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L596)

<a id="function-header_template"></a>

### header_template

```rust
fn header_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
```

Gets the template of the header.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L601)

<a id="function-set_header_template"></a>

### set_header_template

```rust
fn set_header_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
```

Sets the template of the header.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L606)

<a id="function-placeholder_text"></a>

### placeholder_text

```rust
fn placeholder_text(self: &Self) -> String
```

Gets the text shown while the box is empty.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L611)

<a id="function-set_placeholder_text"></a>

### set_placeholder_text

```rust
fn set_placeholder_text(self: &Self, value: impl Into<String>)
```

Sets the text shown while the box is empty.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L616)

<a id="function-text_alignment"></a>

### text_alignment

```rust
fn text_alignment(self: &Self) -> TextAlignment
```

Gets the alignment of the text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L621)

<a id="function-set_text_alignment"></a>

### set_text_alignment

```rust
fn set_text_alignment(self: &Self, value: TextAlignment)
```

Sets the alignment of the text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L626)

<a id="function-description"></a>

### description

```rust
fn description(self: &Self) -> Option<BoxedValue>
```

Gets the content below the box.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L631)

<a id="function-set_description"></a>

### set_description

```rust
fn set_description(self: &Self, value: Option<BoxedValue>)
```

Sets the content below the box.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L636)

<a id="function-validation_mode"></a>

### validation_mode

```rust
fn validation_mode(self: &Self) -> NumberBoxValidationMode
```

Gets the validation mode.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L641)

<a id="function-set_validation_mode"></a>

### set_validation_mode

```rust
fn set_validation_mode(self: &Self, value: NumberBoxValidationMode)
```

Sets the validation mode.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L646)

<a id="function-spin_button_placement_mode"></a>

### spin_button_placement_mode

```rust
fn spin_button_placement_mode(self: &Self) -> NumberBoxSpinButtonPlacementMode
```

Gets where the spin buttons are.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L651)

<a id="function-set_spin_button_placement_mode"></a>

### set_spin_button_placement_mode

```rust
fn set_spin_button_placement_mode(self: &Self, value: NumberBoxSpinButtonPlacementMode)
```

Sets where the spin buttons are.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L656)

<a id="function-is_wrap_enabled"></a>

### is_wrap_enabled

```rust
fn is_wrap_enabled(self: &Self) -> bool
```

Gets whether a step past one end of the range goes to the other end.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L661)

<a id="function-set_is_wrap_enabled"></a>

### set_is_wrap_enabled

```rust
fn set_is_wrap_enabled(self: &Self, value: bool)
```

Sets whether a step past one end of the range goes to the other end.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L666)

<a id="function-accepts_expression"></a>

### accepts_expression

```rust
fn accepts_expression(self: &Self) -> bool
```

Gets whether the text is evaluated as an arithmetic expression.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L671)

<a id="function-set_accepts_expression"></a>

### set_accepts_expression

```rust
fn set_accepts_expression(self: &Self, value: bool)
```

Sets whether the text is evaluated as an arithmetic expression.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L676)

<a id="function-number_formatter"></a>

### number_formatter

```rust
fn number_formatter(self: &Self) -> Rc<dyn INumberBoxNumberFormatter>
```

Gets the formatter of the value and parser of the text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L681)

<a id="function-set_number_formatter"></a>

### set_number_formatter

```rust
fn set_number_formatter(self: &Self, value: Rc<dyn INumberBoxNumberFormatter>)
```

Sets the formatter of the value and parser of the text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L686)

<a id="function-value_changed"></a>

### value_changed

```rust
fn value_changed(self: &Self, handler: impl Fn(&NumberBoxValueChangedEventArgs) -> () + 'static) -> Subscription
```

Adds a handler of the `ValueChanged` event, raised after a change of the value with the
value before it and the coerced new value.

Dropping the returned guard removes the handler; `Subscription::detach` keeps it for
the life of the box.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L695)

<a id="function-validate_input"></a>

### validate_input

```rust
fn validate_input(self: &Self) -> bool
```

Commits the text of the box (WinUI's `ValidateInput`): empty text clears the value; text
that is a number (or, with `AcceptsExpression`, an expression) becomes the value and is
formatted again; other text is replaced with the text of the value unless validation is
disabled. Returns whether the text was a number or empty.

Deviation (docs/porting/winui-controls.md, Input): without a template (no text box) the
text committed is the `Text` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L712)

<a id="function-step_value"></a>

### step_value

```rust
fn step_value(self: &Self, change: f64)
```

Commits the text and adds `change` to the value (WinUI's `StepValue`), wrapping past the
ends of the range when `IsWrapEnabled` is set. Nothing happens while the box is empty.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/number_box.rs#L757)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<NumberBox>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
