Back to Devexpress

TextEditBase.AcceptsReturn Property

wpf-devexpress-dot-xpf-dot-editors-dot-texteditbase-eb209d9e.md

latest3.0 KB
Original Source

TextEditBase.AcceptsReturn Property

Gets or sets whether an end-user can insert return characters into a text. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public bool AcceptsReturn { get; set; }
vb
Public Property AcceptsReturn As Boolean

Property Value

TypeDescription
Boolean

true to allow return characters to be accepted and processed by the editor; otherwise, false.

|

Remarks

If the AcceptsReturn property is set to true , the ENTER key is processed by the editor, and results in a new text line. Otherwise, if the AcceptsReturn property is set to false , return characters are ignored. Return characters, however, can be inserted in code by adding appropriate characters (for instance, “\r\n” for C#) to the TextEditBase.Text property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AcceptsReturn property.

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.

wpf-docklayoutmanager-serialize-docklayoutmanager-when-tabbeddocumentuiservice-is-used/CS/Document.xaml#L16

xml
<dxe:TextEdit VerticalContentAlignment="Top"
              AcceptsReturn="True"
              EditValue="{Binding Text, UpdateSourceTrigger=PropertyChanged}"

wpf-scheduler-specify-custom-edit-and-recurrence-dialogs/CS/CustomMvvmFormWithRecurrenceExample/HospitalAppointmentWindow.xaml#L98

xml
VerticalContentAlignment="Top"
AcceptsReturn="True"
EditValue ="{Binding CustomFields.Notes, Mode=TwoWay}"

See Also

AcceptsTab

TextEditBase Class

TextEditBase Members

DevExpress.Xpf.Editors Namespace