This documentation is archived and is not being maintained.

TextBoxBase.AcceptsTab Property

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

Namespace:  System.Windows.Controls.Primitives
Assembly:  PresentationFramework (in PresentationFramework.dll)

public bool AcceptsTab { get; set; }
<object AcceptsTab="bool" .../>

Property Value

Type: System.Boolean
true if pressing the TAB key inserts a tab character at the current cursor position; false if pressing the TAB key moves the focus to the next control that is marked as a tab stop and does not insert a tab character.
The default value is false.

Identifier field


Metadata properties set to true


The TAB key corresponds to VK_TAB virtual-key code.

This example shows how to enable the acceptance of tab characters as normal input in a TextBox control.

To enable the acceptance of tab characters as input in a TextBox control, set the AcceptsTab attribute to true.

<TextBox AcceptsTab="True">
  If the AcceptsTab element is "True", the TextBox control will accept tab characters as regular input when the TAB key is pressed.  
  If AcceptsTab is "False" (the default), pressing TAB moves the focus to the next focusable control. 

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.