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. This is a dependency property.

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 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

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>

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft