Category / Section
How to hide Header of TabsplitterItem when TabSplitter having single child?
1 min read
TabSplitterItem header can be hidden in TabSplitter, if TabSplitter having single child. It can be achieved by setting the HideHeaderOnSingleChild Property as True.
The same has been explained in the following code snippet:
XAML:
//Code Explains how to hide header in TabSplitter having single child <Window 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" x:Class="TabSplitter1.MainWindow" Title="MainWindow" Height="350" Width="525"> <Grid> <syncfusion:TabSplitter Name="Tabsplit" HideHeaderOnSingleChild="True" > <syncfusion:TabSplitterItem Header="tab1"> <syncfusion:TabSplitterItem.TopPanelItems> <syncfusion:SplitterPage Header="Split1"></syncfusion:SplitterPage> </syncfusion:TabSplitterItem.TopPanelItems> <syncfusion:TabSplitterItem.BottomPanelItems> <syncfusion:SplitterPage Header="Split2"></syncfusion:SplitterPage> </syncfusion:TabSplitterItem.BottomPanelItems> </syncfusion:TabSplitterItem> </syncfusion:TabSplitter> </Grid> </Window>
C#:
//Code Explains how to hide header in TabSplitter having single child namespace TabSplitter1 { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); Tabsplit.HideHeaderOnSingleChild = true; } } }
Output: