How I decided it (by asking the lead architect) ...
Create an ITabActivator interface in one way. Activate.
Create a class derived from Grid and ITabActivator called TabPageActivator. The constructor of which accepts TabITem and TabControl.
Instead of adding a simple table to TabItem.Contents add a TabPageActivator.
Change the definition of the parent to use ...
DependencyObject parent = _Control.Parent;
... instead of using VisualTreeHelper.
So, when you go to the hierarchy test for ...
if (parent - TabActivator) (parent as ITabActivator) .Activate ()
... therefore, when Activate is called
m_TabControl.SelectedItem = m_TabItem; // From the constructor parameters.
... and donโt forget that you may have sub tabs, so you need to keep going in the hierarchy.
David Gray Wright
source share