Silverlight TabControl - Finding and selecting a TabItem from a given Control in the TabItem.
- by David Gray Wright
I am building a LOB application that has a main section and a TabControl with various TabItems in it. On hitting save the idea is that any fields in error are highlighted and the first field in error gets the focus.
If the first, and only, field in error is on an Unselected tab the tab should then become selected and the field in error should become highlighted and have focus. But I can not get this to work.
What appears to be happening is that the Unselected tab is not in the visual tree so you can't navigate back to the owning TabItem and make it the currently selected TabItem in the TabControl.
Has anyone got an idea on how this can be done\achieved?