Getting Started with WPF Tab Splitter

18 Oct 20227 minutes to read

This section explains about how to create TabSplitter control.

Assembly deployment

Refer to the control dependencies section to get the list of assemblies or NuGet package that needs to be added as a reference to use the control in any application.

Click here to find more details on how to install nuget packages in WPF application.

Adding the TabSplitter control via XAML


Download demo application from GitHub

  1. Create a new WPF application via Visual Studio.

  2. Add the following assembly reference to this project.

    • Syncfusion.Shared.WPF
    • Syncfusion.Tools.WPF
  3. Import Syncfusion WPF schema, and declare the TabSplitter control in XAML page.

    <Window x:Class="TabSplitter.MainWindow"
            Title="MainWindow" Height="450" Width="800">
    <Grid Name="grid">
            <syncfusion:TabSplitter Name="tabSplitter" Height="280" Width="400" />

Adding the TabSplitter control via C#

  1. Create a new WPF application via Visual Studio.

  2. Add the following required assembly references to the project.

    • Syncfusion.Shared.WPF
    • Syncfusion.Tools.WPF
  3. Include the required namespace.

    using Syncfusion.Windows.Tools.Controls;
  4. Create an instance of TabSplitter control and add it to the window.

    //Instance of TabSplitter
    TabSplitter tabSplitter = new TabSplitter();
    tabSplitter.Height = 280;
    tabSplitter.Width = 400;
    //Add control into the window

WPF TabSplitter control

Adding splitter item

  1. You can add the splitter item into the TabSplitter control by using Header property. The TabSplitter items contains a collection of panel items. The panel items are TopPanelItems and BottomPanelItems. You can also split the pages in TabSplitter item by using the SplitterPage.

    <syncfusion:TabSplitterItem Header="Window1.xaml">                
            <syncfusion:SplitterPage Header="XAML" />        
            <syncfusion:SplitterPage Header="Design" />
    //Create an instances of splitter page
    SplitterPage splitterPage = new SplitterPage();
    splitterPage.Header = "XAML";
    SplitterPage splitterPage1 = new SplitterPage();
    splitterPage1.Header = "Design";
    //Create the tab splitter item
    TabSplitterItem tabSplitterItem1 = new TabSplitterItem();
    tabSplitterItem1.Header = "MainWindow.XAML";
    //Add the splitter page into the tabSplitterItem
    //Add tabSplitterItem into the tabSplitter
  2. Add any one of the control to the splitter page of TabSplitter and add the content into the splitter page.

    <syncfusion:TabSplitterItem Header="Window1.xaml">                
            <syncfusion:SplitterPage Header="XAML">
                <Label Content="Xaml" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
            <syncfusion:SplitterPage Header="Design">
                <Label Content="Design" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
    Label label = new Label();
    label.Content = "XAML";
    label.HorizontalContentAlignment = HorizontalAlignment.Center;
    label.VerticalContentAlignment = VerticalAlignment.Center;
    Label label1 = new Label();
    label1.Content = "Design";
    label1.HorizontalContentAlignment = HorizontalAlignment.Center;
    label1.VerticalContentAlignment = VerticalAlignment.Center;
    splitterPage.Content = label;
    splitterPage1.Content = label1;

Shows the splitter pages in WPF TabSplitter

Tab orientation

The Tabsplitter items are placed horizontally or vertically by using the Orientation property.

<syncfusion:TabSplitterItem Header="Window1.xaml" Orientation="Vertical">
tabSplitterItem1.Orientation = Orientation.Vertical;

Vertical orientation of WPF TabSplitter

Collapsing bottom panel

You can collapse or expand the bottom panel by setting the IsCollapsedBottomPanel property to true. The default value is false.

<syncfusion:TabSplitterItem Header="Window1.xaml" IsCollapsedBottomPanel="True">
tabSplitterItem1.IsCollapsedBottomPanel = true;

Collapse the splitter item in WPF TabSplitter


TabSplitter supports various built-in themes. Refer to the below links to apply themes for the TabSplitter,

Setting theme to WPF TabSplitter