分页栏控件TabControl默认的选项卡是水平方向的,如下:
现在要改成垂直方向的:
给TabControl 标签添加属性 TabStripPlacement=”Left” , 如下:
<TabControl x:Name="tabControl" DockPanel.Dock="Top" Margin="5" Height="300" VerticalAlignment="Top" TabStripPlacement="Left">
<TabItem Header="户型">
<ScrollViewer VerticalScrollBarVisibility="Auto">
</ScrollViewer>
</TabItem>
<TabItem Header="空间">
<ScrollViewer VerticalScrollBarVisibility="Auto">
</ScrollViewer>
</TabItem>
<TabItem Header="品牌">
<ScrollViewer VerticalScrollBarVisibility="Auto">
</ScrollViewer>
</TabItem>
</TabControl>
运行后效果如下: