Content Index Search
 

Add text to a document

There are several different kinds of text controls that you can add to your Microsoft® Expression Blend™ application. This topic describes describes the different text controls, and explains how to add them.

To add a text control
  1. In the Toolbox, point to the tool that contains the text controls, and then either right-click or click and hold. A list of text controls appears. Click one of the text controls, as described in the following list:
    • TextBox provides an editable region that accepts text input. Use this control when you want users to be able to edit existing text in your application or to enter new text.
    • RichTextBox provides the same functionality as a TextBox object, but supports more text formatting properties and can contain any other type of object, such as an image or shape.
    • TextBlock provides a block of static text that the users of your application cannot edit, and can contain any other type of object, such as an image or shape. Use this control when you need to give instructions to your users, or otherwise to convey information that doesn't need to be edited. Note that while text within this type of control cannot be edited by users of your application, you can change the text via the code-behind file.
    • PasswordBox provides basic password functionality. Use this control to add privacy in your application, so that the text that a user enters within the text control will be displayed by using bullet point characters or another character that you specify, instead of as the characters that the user types.
    • Label provides a block of static text that you can use for basic labeling of other controls or user interface (UI) elements, and can contain any other type of object, such as an image or shape. Additionally, this control provides mnemonic support, which offers functionality for keyboard accessibility and navigation through labeled controls that the user can access by pressing the ALT key in Windows-based applications.
    •   FlowDocumentScrollViewer provides a block of text that has a scrollbar so the user can navigate through the text, and can contain any other type of object, such as an image or shape. You can set properties for this control under Miscellaneous in the Properties panel, to hide or show the vertical and horizontal scrollbars.
  2. Do one of the following:
    • On the artboard, drag to set the desired dimensions of the text control.
    • Double-click the text control's button to insert the control at its default size.