Export (0) Print
Expand All

TextBoxBase::AcceptsReturn Property

Gets or sets a value that indicates how the text editing control responds when the user presses the ENTER key.

Namespace:  System.Windows.Controls.Primitives
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public:
property bool AcceptsReturn {
	bool get ();
	void set (bool value);
}
<object AcceptsReturn="bool" .../>

Property Value

Type: System::Boolean
true if pressing the ENTER key inserts a new line at the current cursor position; otherwise, the ENTER key is ignored. The default value is false for TextBox and true for RichTextBox.

Identifier field

AcceptsReturnProperty

Metadata properties set to true

None

The ENTER key corresponds to VK_RETURN virtual-key code.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft