Articles in this section
Category / Section

How to set different layout types for the TabItem in TabControlExt?

1 min read

The WPF TabControlExt control’s layout type can be set to Different by using the TabItemLayout property. This property value can be set to SingleLine, MultiLine, or MultiLineWithFullWitdth. When the TabItemLayout property is set to SingleLine, the Tab items are displayed in a single line. When it is set to MultiLine, the Tab items are displayed in multiple lines, and when set to MultiLineWithFullWidth, the Tab items are extended to the full width and displayed in multiple lines.

The same is explained by using the following code example.

 

XAML

<Window x:Class="Tabcontrol.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>
        <syncfusion:TabControlExt x:Name="tabcontrol" TabItemLayout="MultiLineWithFullWidth">
            <syncfusion:TabItemExt Name="tabitem1" Header="window"></syncfusion:TabItemExt>
            <syncfusion:TabItemExt Name="tabitem2" Header="Desktop"></syncfusion:TabItemExt>
            <syncfusion:TabItemExt Name="tabitem3" Header="view"></syncfusion:TabItemExt>
            <syncfusion:TabItemExt Name="tabitem4" Header="Design"></syncfusion:TabItemExt>
            <syncfusion:TabItemExt Name="tabitem5" Header="control"></syncfusion:TabItemExt>
            <syncfusion:TabItemExt Name="tabitem6" 

 

Header="tabitem"></syncfusion:TabItemExt>
            <syncfusion:TabItemExt Name="tabitem8" Header="tabitem2"></syncfusion:TabItemExt>
            <syncfusion:TabItemExt Name="tabitem9" Header="tabitem3"></syncfusion:TabItemExt>
<syncfusion:TabItemExt Name="tabitem10" Header="tabitem4”/>
        </syncfusion:TabControlExt></Grid></Window>

 

C#

namespace Tabcontrol
{
public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            tabcontrol.TabItemLayout = TabItemLayoutType.MultiLineWithFullWidth;  
        }
    }
}

 

The following screenshots show the different TabItemLayOut types in the TabControlExt control.

Single line

Figure 1: SingleLine

 

Multiline

Figure 2: MultiLine

MultiLine With Full Width

Figure 3: MultiLineWithFullWidth



Conclusion

I hope you enjoyed learning about how to set different layout types for the TabItem in TabControlExt.

You can refer to our WPF TabControl feature tour page to know about its other groundbreaking feature representations and documentation. You can also explore our WPF TabControl Example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

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