AutoCompleteBox and TabIndex

Feb 26, 2010 at 10:59 PM

I have just replaced a custom autocomplete box I was using with the WPFToolkit one.  I have a grid with a couple textboxes, datepicker, combobox and now autocomplete boxes.  when I tab for some reason the autocomplete box is always tabed to last, no matter what the tab index is.  Any idea why this might be happening?

Jun 17, 2010 at 3:49 PM

I found a work-around for this issue

I wrapped the AutoCompleteBox in a ContentControl:

<ContentControl Margin="2" Focusable="False">
   <toolkit:AutoCompleteBox x:Name="IconFileTextBox" Populating="IconFileTextBox_Populating" Grid.Column="0" Text="{Binding Path=IconFileName, Mode=TwoWay}" Padding="0" Margin="0" />
Note that the ContentControl Focusable property is set to False.
Now the AutoCompleteBox gets the focus according to the tab index.
Aug 2, 2010 at 4:32 PM
Not working i am having the same issue with the tab order can you please help me out.
Aug 2, 2010 at 5:30 PM
I have a similar issue about focus. I put the AutoCompleteBox control in a grid. I bind a transparent storyboard on the grid. I write on the code behind to make the keyboard focus on AutoCompleteBox. But it doesn't work. Instead, the textblock works well.