RichTextBox.AcceptsReturn Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets a value that determines whether the RichTextBox allows and displays the newline or return characters when the ENTER or RETURN keys are pressed.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<RichTextBox AcceptsReturn="bool"/>
Property Value
Type: System.Booleantrue if the RichTextBox allows newline characters; otherwise, false. The default is true.
You can disable multi-line content in a RichTextBox control by using the AcceptsReturn property. Use the HorizontalScrollBarVisibility or VerticalScrollBarVisibility to enable the horizontal scrollbars or the vertical scrollbars.