tags:

views:

351

answers:

1

I have a WPF tab control with a largu number of tabs and they are presented in a sequential line all across the screen. Which mean that a user needs to scroll sideways in order to view all the tabs.

Is there a way to create two rows of tabs or make the long row of tabs "wrap" into two or more rows?

A: 

Wrapping is the default behavior for tab controls. Any style or control template you're using that interferes with that?

The following code

<Window x:Class="WpfApplication1.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Window1" Height="300" Width="300" AllowsTransparency="True" WindowStyle="None">
    <Grid>
        <TabControl>
            <TabItem Header="TabItem"/>
            <TabItem Header="TabItem"/>
            <TabItem Header="TabItem"/>
            <TabItem Header="TabItem"/>
            <TabItem Header="TabItem"/>
            <TabItem Header="TabItem"/>
            <TabItem Header="TabItem"/>
            <TabItem Header="TabItem"/>
            <TabItem Header="TabItem"/>
            <TabItem Header="TabItem"/>
            <TabItem Header="TabItem"/>
        </TabControl>
    </Grid>
</Window>

yields

Window with many tabs in a tab control

Joey
Indeed, that was the case. The enclosing grid was the problem, not the tab control. Thanx
Jim Beam