Adding a TextBox
This exercise describes how to add a TextBox:
- Click and drag a TextBox from the Toolbox to the Design Sheet:
- In the Properties pane, enter (or cut and paste) the Text you want to display:
- In the Properties pane, scroll down and set the TextWrapping property to Wrap:
- Resize the TextBox to accommodate the text and align the control with other controls on the form.
- Save your changes and click Run to run the form:
Resize
Click and drag the corners of the control to resize the control.
Reposition
Click and drag the handle (top-left) to reposition the control.
VerticalAlignment and HorizontalAlignment properties can be set to align controls to the Top, Bottom, Left, Right, or Centre of the form:
A TextAlignment property (and Padding) can be set in the Properties pane to align the text to the Left, Right or Centre of the control.
The form shows the text you have added in the TextBox. Unlike a TextBlock, you can select and edit the text of the TextBox at runtime: