Partilhar via


Make text editable or read-only

This page applies to WPF projects only

You can control whether users of your Microsoft Expression Blend application can edit the text that is contained within TextBox or RichTextBox objects in the application, or whether the text in those objects is read-only. If you set the text to be editable, you can also specify whether users can undo the last text edit that they performed.

To designate whether text can be edited

  1. Select the TextBox or RichTextBox object that you want to format.

  2. In the Properties panel, under Text, click the Show advanced properties Cc295308.cd646a24-b6e4-4f8d-9d64-8349ceb9c013(en-us,Expression.10).png button to see the IsReadOnly and IsUndoEnabled properties.

    Tip

    If you do not see the properties, you might be in text-editing mode (F2), which lets you change the text that is displayed in the control. To exit text-editing mode, press ESC.

  3. Select or clear the following properties:

    • IsReadOnly, to set whether users can edit the text in the object.

    • IsUndoEnabled, to set whether users can press CTRL+Z to undo text edits.