Receiving Input Using a TextBox

The Windows Phone SDK includes three controls designed for text entry: TextBox, PasswordBox, and RichTextBox. Text can be entered either by using the onscreen keyboard known as the Software Input Panel (SIP) or by using the hardware keyboard if the phone has one.

The TextBox control displays content as well as allowing the user to type or edit content. A TextBox can display text on a single line, or on multiple lines. A multiline TextBox wraps text to the width of the control.

Text is stored as a System.String, using the TextBox.Text property. The alignment of the text can be changed using the TextAlignment property. Text is displayed according to various font-related properties, shown earlier in Table 6.1.

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.