The fastest way is to collapse it using the VisualTreeHelper class. For example if you have a method that removes TabItems (ex. RemoveTabItem()
) it might look like the following:
// Remove the tab item
.tabControl1.Items.Count == 1)
var root = VisualTreeHelper.GetChild(
var headerElement = root.FindName(
headerElement.Visibility = System.Windows.Visibility.Collapsed;
Give it a try and let me know if it helps.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items