Version

TabLayoutStyle Property (XamTabControl)

Determines how the tab items will be arranged.
Syntax
'Declaration
 
Public Property TabLayoutStyle As TabLayoutStyle
public TabLayoutStyle TabLayoutStyle {get; set;}
Example
The following shows how to set the TabLayoutStyle to one of the 'MultiRow' settings and limit the number of visible tab rows to 4. It also shows how to specify inter-tab and inter-row spacing and set the MaximumSizeToFitAdjustmrnt so the tabs are never sized too large. Note: that if the control is sized such that it requires more than the 'MaximumTabRows' to display all of the tabs then scroll buttons will be displayed to scroll to any tabs that are out of view.

Imports Infragistics.Windows.Controls

Class Window1

    Public Sub New()

        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

        ' tabs will be displayed on multiple rows and sized so fit each row
        Me.XamTabControl1.TabLayoutStyle = TabLayoutStyle.MultiRowSizeToFit

        ' the maximum visible tab rows is set to 4. If the tab control is sized
        ' so there are more than 4 rows then scroll buttons will be displayed
        Me.XamTabControl1.MaximumTabRows = 4

        ' Specify the maximum # of device independent units that can be added 
        ' to each tab item we adjusting to fit the size of the XamTabControl.
        ' Setting this limit prevents the tabs from being resized too large.
        Me.XamTabControl1.MaximumSizeToFitAdjustment = 50

        ' specify the spacing between each tab
        Me.XamTabControl1.InterTabSpacing = 2

        ' specify the spacing between each tab row
        Me.XamTabControl1.InterRowSpacing = 2

        ' specify the minimum extent to each tab
        Me.xamTabControl1.MinimumTabExtent = 150

    End Sub
End Class
using Infragistics.Windows.Controls;
    

    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();

            // tabs will be displayed on multiple rows and sized so fit each row
            this.xamTabControl1.TabLayoutStyle = TabLayoutStyle.MultiRowSizeToFit;

            // the maximum visible tab rows is set to 4. If the tab control is sized
            // so there are more than 4 rows then scroll buttons will be displayed
            this.xamTabControl1.MaximumTabRows = 4;

            // Specify the maximum # of device independent units that can be added 
            // to each tab item we adjusting to fit the size of the XamTabControl.
            // Setting this limit prevents the tabs from being resized too large.
            this.xamTabControl1.MaximumSizeToFitAdjustment = 50;

            // specify the spacing between each tab
            this.xamTabControl1.InterTabSpacing = 2;

            // specify the spacing between each tab row
            this.xamTabControl1.InterRowSpacing = 2;
 
            // specify the minimum extent to each tab
            this.xamTabControl1.MinimumTabExtent = 150;
       }
    }
<Window x:Class="XamTabControl_cs.Window1"
    
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    
Title="Window1" Height="300" Width="647" 
    
xmlns:igThemes="http://infragistics.com/Themes" 
    
xmlns:igWindows="http://infragistics.com/Windows">
    
<Grid >

        
<igWindows:XamTabControl Name="xamTabControl1" 
             
Margin="19,50,10,12" 
             
TabLayoutStyle="MultiRowSizeToFit"
             
MaximumTabRows="4"
             
MaximumSizeToFitAdjustment="50"
             
InterTabSpacing="2" 
             
InterRowSpacing="2">

            
<igWindows:TabItemEx Header="tabItemEx1" Name="tabItemEx1" >
                
<Grid /> <!-- tab item content goes here -->
            
</igWindows:TabItemEx>

        
</igWindows:XamTabControl>

     
</Grid>
</Window>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also