How do I hide the header and close button

I see a property HideHeaderOnSingleChild="True" to hide the tab but there is no property to set visibility of the Close button (equivalent to CloseMode="Hide" CloseButtonType="Hide" in TabExt control).

I want to completely hide the header and the close button. Is it possible?

3 Replies

AI Anirudhan Iyyappan Syncfusion Team March 16, 2020 09:46 AM UTC

Hi SSM, 
  
Thanks for contacting Syncfusion support. 
  
We have checked your query “How to hide the header and close button”. By setting the CloseButtonType property as Hide we can move the close button to hidden state. Then to hide header, there is no direct option to hide TabItemExt Headers and we have placed TabItemExt Headers on TabLayoutPanel container. So, you can hide the TabItemExt Header by collapsing TabLayoutPanel visibility. 
 
If you would like to hide the complete header, then by setting the TabItemExt Visibility property to Hidden State we can Hide the Tabcontrol complete header. But then, we couldn't able to switch the tabs. 
  
Please check the below Code Snippet and Screenshot for your references. 
  
Xaml:  
  
  
<syncfusion:TabControlExt Grid.Row="1" Name="Tabcontrol"  Loaded="TabControlExt_Loaded" CloseButtonType="Hide"> 
            <syncfusion:TabItemExt Header="Tab1" > 
                <TextBlock Text="Block1"></TextBlock> 
            </syncfusion:TabItemExt>             
            <syncfusion:TabItemExt Header="Tab2"> 
                <TextBlock Text="Block2"></TextBlock> 
            </syncfusion:TabItemExt> 
            <syncfusion:TabItemExt Header="Tab3"> 
                <TextBlock Text="Block3"></TextBlock> 
            </syncfusion:TabItemExt> 
</syncfusion:TabControlExt> 
  
C#: 
  
  
private void TabControlExt_Loaded(object sender, RoutedEventArgs e) 
        { 
                                    TabLayoutPanel panel = VisualUtils.FindDescendant(sender as TabControlExt, typeof(TabLayoutPanel)) as TabLayoutPanel; 
                                    if (panel != null) 
                                        //Collapse the tab item header 
                                                panel.Visibility = Visibility.Collapsed; 
        }  
  
Screenshot:  
  
 
 
Please refer the below sample for further references. 
  
  
Regards, 
Anirudhan. 
 



SS ssm March 17, 2020 06:05 AM UTC

Hi,

I probably did not specify it properly in my earlier post. I am looking to achieve the same for TabSplitter control not TabControlExt.

Thanks,


AI Anirudhan Iyyappan Syncfusion Team March 18, 2020 12:17 PM UTC

Hi SSM. 
 
Sorry for the inconveniences. 
 
Based on your update we have customized your sample by using the Edit template. Please check the below sample and screenshot for further references. 
 
Screenshot:  
 
 
 
 
Regards, 
Anirudhan. 


Loader.
Up arrow icon