Share via


NumberBox.Text Property

Definition

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

public:
 property Platform::String ^ Text { Platform::String ^ get(); void set(Platform::String ^ value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
winrt::hstring Text();

void Text(winrt::hstring value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
winrt::hstring Text();

void Text(winrt::hstring value);
public string Text { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
public string Text { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
var string = numberBox.text;
numberBox.text = string;
Public Property Text As String

Property Value

String

Platform::String

winrt::hstring

Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute

Remarks

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

Applies to