Condividi tramite


NumberBox.Text Proprietà

Definizione

Ottiene o imposta la rappresentazione del tipo di stringa della proprietà Value .

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

Valore della proprietà

String

Platform::String

winrt::hstring

Attributi
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute

Commenti

Questa proprietà esiste per facilitare il recupero della rappresentazione di stringa del contenuto numerico di Value senza la necessità di conversione dei tipi. Si noti che il contenuto di Value sovrascriverà il contenuto di questa proprietà nella configurazione iniziale. Dopo la configurazione iniziale, le modifiche apportate a una verranno progrogate all'altra, ma apportando in modo coerente modifiche a livello di codice tramite Value , è possibile evitare eventuali malintesi concettuali che NumberBox accetterà caratteri non numerici tramite questa proprietà.

Si applica a