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'."}
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
精彩评论