What\'s the programmatic way (ie not using styles as in this question, but using code) to hide the TabControl
header? I\'ll be glad for a snippet.
I've tried this in some code where I populate the tab items manually...
tabItemToAdd.Visibility = Visibility.Collapsed;
...but then I had a weird thing happen where the second time I'd clear out the tab control's items, create the tab item again and use this approach before adding it to the tab control, the entire tab item and its contents were gone, not just the tab header. So I've had success with the programmatic equivalent of this solution:
tabItemToAdd.Template = new ControlTemplate();