Share via


NumberBox.Value Propriété

Définition

Obtient ou définit la valeur numérique d’un NumberBox.

Cette documentation s’applique à WinUI 2 pour UWP (pour WinUI dans le SDK d'application Windows, consultez les espaces de noms SDK d'application Windows).

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

void Value(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)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="std::numeric_limits<double>::quiet_NaN()")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="std::numeric_limits<double>::quiet_NaN()")]
double Value();

void Value(double value);
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; }
[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; }
Public Property Value As Double

Valeur de propriété

Double

double

Attributs
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Remarques

Le texte existe pour facilier l’obtention de la représentation sous forme de chaîne du contenu numérique de cette propriété sans avoir besoin de conversion de type. Notez que le contenu de cette propriété remplacera le contenu du texte dans la configuration initiale. Une fois la configuration initiale effectuée, les modifications apportées à l’une seront progrogates vers l’autre, mais en faisant constamment des modifications par programmation via cette propriété, cela permet d’éviter tout malentendu conceptuel que NumberBox acceptera des caractères non numériques par le biais de la propriété Text .

S’applique à