Compartir a través de


Make text editable or read-only

You can control whether users of your Blend para Visual Studio 2012 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.

    Nota importanteImportante

    If you are working in a Microsoft Silverlight project, RichTextBox is the only object that you can make editable or read-only. If you are working in a Windows Presentation Foundation (WPF) project, both TextBox and RichTextBox objects can be made editable or read-only.

  2. In the Properties panel, under Text, click Show advanced properties JJ170736.de239c9d-42ce-4f5e-83b9-5f9924c0431f(es-es,VS.110).png to see the IsReadOnly and IsUndoEnabled properties.

    SugerenciaSugerencia

    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.