A newer version of this page is available. Switch to the current version.

TextEditBase Class

Serves as the base class for editors that provide the text editing capability (e.g. TextEdit, ComboBoxEdit, DateEdit).

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v19.2.dll


public abstract class TextEditBase :
Public MustInherit Class TextEditBase
    Inherits BaseEdit
    Implements ITextExportSettings,


The TextEditBase abstract class implements basic functionality for editors that provide the text editing capability.


The TextEditBase class inherits its features from the BaseEdit class.

Refer to the BaseEdit class description for information on derived features and API.

Editor Value

The Text property contains the text displayed within the editor. To get the text, currently displayed within the editor (as end user types), use the EditText property.

You can limit the maximum number of characters an end-user can enter into the editor using the MaxLength property.

Useful API

Text Operations

The TextEditBase class provides the following methods for text operations:

Text Selection

Set the SelectAllOnGotFocus property to true to enable automatic text selection when the editor gets focus via the keyboard. To enable text selection when the editor gets focus via mouse click, set the SelectAllOnMouseUp to true.

To select all the text within the editor manually, use the SelectAll method. To select only the specified amount of text, use the TextEdit.Select(System.Int32,System.Int32) method.

Trimming and Wrapping

Text content of the editor is trimmed when it overflows the editor's edges in display mode. You can change this behavior using the TextTrimming property. The TextTrimming property has no effect unless the TextEditBase.TextWrapping property is set to NoWrap.

If the text wrapping is enabled, the text editor can display multiple text lines. The LineCount property gets the total number of text lines.

Useful API

See Also