Anthony Greco
Anthony Greco

Reputation: 2935

WPF Custom Control Tab Index

I have a custom control in WPF that simply holds a combo box (however I have a few features of it, which is why its sitting inside this custom control.). When I tab through the items and reach it, I can no longer tab anymore. I tried tabbing back and fwd and nothing works. I have this same logic used for a textbox and it works just fine, just the combobox is causing a lockup.

Any ideas how to make it continue tabbing through my UI?

This is a semi dupe of WPF tab order with custom controls? however the answer there for C# does not work for me. It is throwing me the error: {"PropertyMetadata is already registered for type 'ctrlComboBox'."}

Upvotes: 1

Views: 2052

Answers (1)

Dennis
Dennis

Reputation: 20571

It sounds like the KeyboardNavigation.TabNavigation property is set to KeyboardNavigationMode.Contained when you possible want it to be KeyboardNavigationMode.Continue.

Have a read of the MSDN article on Focus, specifically the section on Keyboard Navigation. http://msdn.microsoft.com/en-us/library/aa969768.aspx

Upvotes: 2

Related Questions