Class NumberBox<T>
Represents an abstract control that can be used to display and edit numbers.
Inheritance
Implements
Inherited Members
Namespace: WinUIEx
Assembly: WinUIEx.dll
Syntax
public abstract class NumberBox<T> : Control, IEquatable<DependencyObject>, IAnimationObject, IVisualElement, IVisualElement2, IEquatable<UIElement>, IEquatable<FrameworkElement>, IWinRTObject, IDynamicInterfaceCastable, IEquatable<Control> where T : struct, INumber<T>, IMinMaxValue<T>
Type Parameters
| Name | Description |
|---|---|
| T |
Remarks
This control supports validation, increment stepping, and computing inline calculations of basic equations such as multiplication, division, addition, and subtraction.
Constructors
| Name | Description |
|---|---|
| NumberBox() | Initializes a new instance of the NumberBox class. |
Fields
| Name | Description |
|---|---|
| AcceptsExpressionProperty | Identifies the AcceptsExpression dependency property. |
| AllowNullProperty | Identifies the AllowNull dependency property. |
| DescriptionProperty | Identifies the Description dependency property. |
| HeaderProperty | Identifies the Header dependency property. |
| HeaderTemplateProperty | Identifies the HeaderTemplate dependency property. |
| InputScopeProperty | Identifies the InputScope dependency property. |
| IsWrapEnabledProperty | Identifies the IsWrapEnabled dependency property. |
| LargeChangeProperty | Identifies the LargeChange dependency property. |
| MaximumProperty | Identifies the Maximum dependency property. |
| MinimumProperty | Identifies the Minimum dependency property. |
| NumberFormatterProperty | Identifies the NumberFormatter dependency property. |
| PlaceholderTextProperty | Identifies the PlaceholderText dependency property. |
| PreventKeyboardDisplayOnProgrammaticFocusProperty | Identifies the PreventKeyboardDisplayOnProgrammaticFocus dependency property. |
| SelectionFlyoutProperty | Identifies the SelectionFlyout dependency property. |
| SelectionHighlightColorProperty | Identifies the SelectionHighlightColor dependency property. |
| SmallChangeProperty | Identifies the SmallChange dependency property. |
| SpinButtonPlacementModeProperty | Identifies the SpinButtonPlacementMode dependency property. |
| TextAlignmentProperty | Identifies the TextAlignment dependency property. |
| TextProperty | Identifies the Text dependency property. |
| TextReadingOrderProperty | Identifies the TextReadingOrder dependency property. |
| ValidationModeProperty | Identifies the ValidationMode dependency property. |
| ValueProperty | Identifies the Value dependency property. |
Properties
| Name | Description |
|---|---|
| AcceptsExpression | Gets or sets a value that indicates whether the control accepts and evaluates a basic formulaic expression entered as input. |
| AllowNull | Gets a value indicating whether a null value is allowed as input. Set to false if you're binding to a non-nullable value |
| Description | Gets or sets content that is shown below the control. The content should provide guidance about the input expected by the control. |
| Header | Gets or sets the content for the control's header. |
| HeaderTemplate | Gets or sets the DataTemplate used to display the content of the control's header. |
| InputScope | Gets or sets the InputScope for the NumberBox. |
| IsWrapEnabled | Gets or sets a value that indicates whether line breaking occurs when header text extends beyond the available width of the control. |
| LargeChange | Gets or sets a number that is added to or subtracted from Value when a large change is made, such as with the PageUp and PageDown keys. |
| Maximum | Gets or sets the numerical maximum for Value. |
| Minimum | Gets or sets the numerical minimum for Value. |
| NumberFormatter | Gets or sets the object used to specify the formatting of Value. |
| PlaceholderText | Gets or sets the text that is displayed in the data entry field of the control until the value is changed by a user action or some other operation. |
| PreventKeyboardDisplayOnProgrammaticFocus | Gets or sets a value that indicates whether the on-screen keyboard is shown when the control receives focus programmatically. |
| SelectionFlyout | Gets or sets the flyout that is shown when text is selected, or |
| SelectionHighlightColor | Gets or sets the brush used to highlight the selected text. |
| SmallChange | Gets or sets a number that is added to or subtracted from Value when a small change is made, such as with an arrow key or scrolling. |
| SpinButtonPlacementMode | Gets or sets a value that indicates the placement of buttons used to increment or decrement the Value property. |
| Text | Gets or sets the string type representation of the Value property. |
| TextAlignment | Gets or sets the text alignment of the text in the control. |
| TextReadingOrder | Gets or sets a value that indicates how the reading order is determined for the NumberBox. |
| ValidationMode | Gets or sets a value that specifies the input validation behavior to invoke when invalid input is entered. |
| Value | Gets or sets the numeric value of a NumberBox. |
Methods
| Name | Description |
|---|---|
| OnApplyTemplate() | Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class. |
| OnCreateAutomationPeer() | When implemented in a derived class, returns class-specific AutomationPeer implementations for the Microsoft UI Automation infrastructure. |
Events
| Name | Description |
|---|---|
| ValueChanged | Occurs after the user triggers evaluation of new input by pressing the Enter key, clicking a spin button, or by changing focus. |