Articles in this section
Category / Section

How to hide the header of the TabNavigationItem in TabNavigationControl?

1 min read

Header visibility of the TabNavigationItem in the TabNavigationControl can be changed by HeaderVisibility. The same has been demonstrated in the following code snippet:

XAML:

<Window x:Class="DockingManager_new.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
Title="MainWindow" Height="350" Width="525">
<Grid x:Name="Grid1">
<syncfusion:TabNavigationControl x:Name="TabNavigation" HeaderVisibility="Collapsed" >
<syncfusion:TabNavigationItem Header="TabItem1"/>
<syncfusion:TabNavigationItem Header="TabItem2"/>
<syncfusion:TabNavigationItem Header="TabItem3"/>
</syncfusion:TabNavigationControl>
</Grid>
</Window>

 

C#:

using Syncfusion.Windows.Tools.Controls;
namespace DockingManager_new
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
TabNavigationControl _Tabnavigation = new TabNavigationControl();
_Tabnavigation.HeaderVisibility = Visibility.Collapsed;;
TabNavigationItem item1 = new TabNavigationItem();
item1.Header = "TabItem1";
TabNavigationItem item2 = new TabNavigationItem();
item2.Header = "TabItem2";
TabNavigationItem item3 = new TabNavigationItem();
item3.Header = "TabItem3";
Grid1.Children.Add(_Tabnavigation);
}
}
}

 

Output:

By default, header of TabNavigationItem would be visible.

 

 

The following output shows that on Setting the HeaderVisibility property to Collapsed, the Header would not be visible.

             

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied