Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TextEdit.SelectionLength Property

Gets or sets the number of selected characters.

Namespace: DevExpress.Xpf.Editors

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

NuGet Package: DevExpress.Wpf.Core

#Declaration

[Browsable(false)]
public int SelectionLength { get; set; }

#Property Value

Type Description
Int32

An integer value that specifies the number of selected characters.

#Remarks

The SelectionLength property returns the number of characters in the current selection. Setting this property to a new value adjusts the length of the current selection to the specified value, keeping the beginning of the selection fixed.

To select the text, use the TextEdit.Select method. All text can be selected using the TextEditBase.SelectAll method.

See Also