NumberBox.Value Property

Definition

Gets or sets the numeric value of a NumberBox.

C#
public double Value { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="std::numeric_limits<double>::quiet_NaN()")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="std::numeric_limits<double>::quiet_NaN()")] set; }
C#
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="std::numeric_limits<double>::quiet_NaN()")]
public double Value { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="std::numeric_limits<double>::quiet_NaN()")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="std::numeric_limits<double>::quiet_NaN()")] set; }

Property Value

Double

The numeric value of a NumberBox. The default is Double.NaN.

Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Remarks

The Text property exists to facilitate getting the string representation of this property's numeric contents without the need for type conversion. The content of this property will overwrite the content of Text in initial set up. After the initial set up, changes to one will be propagated to the other, but consistently making programmatic changes through this property helps avoid any conceptual misunderstanding that NumberBox will accept non-numeric characters through the Text property.

Applies to

Product Versions
Windows App SDK 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6

See also