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)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public bool AcceptsTab { get; set; }
/** @property */
public boolean get_AcceptsTab ()

/** @property */
public void set_AcceptsTab (boolean value)

public function get AcceptsTab () : boolean

public function set AcceptsTab (value : boolean)

<object AcceptsTab="bool" .../>

Property Value

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.

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. 
</TextBox>

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: