Export (0) Print
Expand All

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)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

'Declaration
Public Property AcceptsTab As Boolean
<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

AcceptsTabProperty

Metadata properties set to true

None

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>

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft