NumberBox Class

Definition

Represents a control that can be used to display and edit numbers.

class NumberBox : Control
[Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
[Windows.Foundation.Metadata.Composable(typeof(Microsoft.UI.Xaml.Controls.INumberBoxFactory), Windows.Foundation.Metadata.CompositionType.Public, 1)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Microsoft.UI.Xaml.Controls.INumberBoxStatics), 1)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
[Windows.Foundation.Metadata.WebHostHidden]
public class NumberBox : Control
Public Class NumberBox
Inherits Control
Inheritance
NumberBox
Attributes

Remarks

This control supports validation, increment stepping, and computing inline calculations of basic equations such as multiplication, division, addition, and subtraction.

Constructors

NumberBox()

Initializes a new instance of the NumberBox class.

Properties

AcceptsExpression

Toggles whether the control will accept and evaluate a basic formulaic expression entered as input.

AcceptsExpressionProperty

Identifies the AcceptsExpression dependency property.

Description

Gets or sets content that is shown below the control. The content should provide guidance about the input expected by the control.

DescriptionProperty

Identifies the Description dependency property.

Header

Gets or sets the content for the control's header.

HeaderProperty

Identifies the Header dependency property.

HeaderTemplate

Gets or sets the DataTemplate used to display the content of the control's header.

HeaderTemplateProperty

Identifies the HeaderTemplate dependency property.

IsWrapEnabled

Toggles whether line breaking occurs if a line of text extends beyond the available width of the control.

IsWrapEnabledProperty

Identifies the IsWrapEnabled dependency property.

LargeChange

Gets or sets the value that is added to or subtracted from Value when a large change is made, such as with the PageUP and PageDown keys.

LargeChangeProperty

Identifies the LargeChange dependency property.

Maximum

Gets or sets the numerical maximum for Value.

MaximumProperty

Identifies the Maximum dependency property.

Minimum

Gets or sets the numerical minimum for Value.

MinimumProperty

Identifies the Minimum dependency property.

NumberFormatter

Gets or sets the object used to specify the formatting of Value.

NumberFormatterProperty

Identifies the NumberFormatter dependency property.

PlaceholderText

Gets or sets the text that is displayed in the control until the value is changed by a user action or some other operation.

PlaceholderTextProperty

Identifies the PlaceholderText dependency property.

PreventKeyboardDisplayOnProgrammaticFocus

Gets or sets a value that indicates whether the on-screen keyboard is shown when the control receives focus programmatically.

PreventKeyboardDisplayOnProgrammaticFocusProperty

Identifies the PreventKeyboardDisplayOnProgrammaticFocus dependency property.

SelectionFlyout

Gets or sets the flyout that is shown when text is selected, or null if no flyout is shown.

SelectionFlyoutProperty

Identifies the SelectionFlyout dependency property.

SelectionHighlightColor
SelectionHighlightColorProperty

Identifies the SelectionHighlightColor dependency property.

SmallChange

Gets or sets the value that is added to or subtracted from Value when a small change is made, such as with an arrow key or scrolling.

SmallChangeProperty

Identifies the SmallChange dependency property.

SpinButtonPlacementMode

Gets or sets a value that indicates the placement of buttons used to increment or decrement the Value property.

SpinButtonPlacementModeProperty

Identifies the SpinButtonPlacementMode dependency property.

Text

Gets or sets the string type representation of the Value property.

TextProperty

Identifies the Text dependency property.

TextReadingOrder

Gets or sets a value that indicates how the reading order is determined for the NumberBox.

TextReadingOrderProperty

Identifies the TextReadingOrder dependency property.

ValidationMode

Gets or sets the input validation behavior to invoke when invalid input is entered.

ValidationModeProperty

Identifies the ValidationMode dependency property.

Value

Gets or sets the numeric value of a NumberBox.

ValueProperty

Identifies the Value dependency property.

Events

ValueChanged

Occurs after the user triggers evaluation of new input by pressing the Enter key, clicking a spin button, or by changing focus.

Applies to