TextEdit Class
Represents a text editor.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v18.2.dll
Declaration
Remarks
The TextEdit represents a single-line text editor by default. To enable multi-line editing, set the TextEditBase.TextWrapping property to ‘Wrap’.
To allow an end user to insert return or tabulation characters into a text, set the TextEditBase.AcceptsReturn or TextEditBase.AcceptsTab property to true, respectively.
The editor’s value can be specified using the BaseEdit.EditValue or TextEditBase.Text property. To respond to changing the editor’s value, handle the BaseEdit.EditValueChanged event. To check the new value’s validity, handle the BaseEdit.Validate event. To learn more, see Input Validation.
The TextEdit allows you to use masks during editing. To learn more, see Masked Input.
Tip
To embed a TextEdit into a container control, use the TextEditSettings class.
Example
To add a standalone TextEdit to a Window, drag it from the Toolbox.
The following sample demonstrates how to create a TextEdit using XAML markup.
<dxe:TextEdit
VerticalScrollBarVisibility="Auto"
AcceptsReturn="True"
NullText="Type your name here..."
/>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the TextEdit class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.