views:

151

answers:

2

When the user presses a tab in this textbox, the cursor jumps an equivalent of 8 spaces.

How can I change it so it jumps only 4 or 2?

<TextBox
    Width="200"
    Height="200"
    Margin="0 0 10 0"
    AcceptsReturn="True"
    AcceptsTab="True"
    Text="{Binding OutlineText}"/>
+1  A: 

I suggest you take a look at Typography property of the TextBox. Even though I could not immediately find anything about tab size in there, this is the property that affects the way the text is rendered by the TextBox so it might as well be the thing you're looking for.

Alex_P
A: 

Try a control that allows you to set the tab size. Maybe http://wpfsyntax.codeplex.com/ will do?

zwi