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)

public:
property bool AcceptsReturn {
	bool get();
	void set(bool value);
}

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.

The ENTER key corresponds to VK_RETURN virtual-key code.

Identifier field

AcceptsReturnProperty

Metadata properties set to true

None

.NET Framework
Available since 3.0
Return to top
Show: