Windows Dev Center

TextBox.Text Property

Gets or sets the text contents of the text box.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

'Declaration
Public Property Text As String
<TextBox Text="string"/>

Property Value

Type: System.String
A string containing the text contents of the text box. The default is an empty string ("").

ExceptionCondition
ArgumentNullException

The value is set to Nothing.

Getting this property returns a string copy of the contents of the text box. Setting this property replaces the contents of the text box with the specified string.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2015 Microsoft