我有一个具有大量选项卡的WPF TabControl
,它们在屏幕上显示了一个顺序的行。这意味着用户需要向外滚动以查看所有标签。
有一种方法可以以创建两行选项卡,或者者将选项卡的长行创建为两行或者多行?
包装是 TabControl
的默认行为。你正在使用的任何 Style
或者 ControlTemplate
都会干扰?
以下代码:
<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>
收益率
窗口,其中包含选项卡控件 http://hypftier.de/dump/wpf_tab_control_wrap.png 中的多个选项卡。