如何在 WPF 中构建垂直选项卡集? [英] How to build vertical tab sets in WPF?

查看:35
本文介绍了如何在 WPF 中构建垂直选项卡集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 WPF 中构建垂直标签集?选项卡会从上到下堆叠,就像 Visual Studio 中显示的项目的属性"一样.

How to build vertical tab sets in WPF? The tabs will stack up in top-to-bottom just like the "Properties" of a project shown in visual studio.

推荐答案

您是否尝试过 TabControl.TabStripPlacement 属性?

Have you tried the TabControl.TabStripPlacement Property?

以下示例创建一个选项卡控件,将选项卡定位在左侧.

The following example creates a tab control that positions the tabs on the left side.

<TabControl TabStripPlacement="Left" Margin="0, 0, 0, 10">
  <TabItem Name="fontweight" Header="FontWeight">
    <TabItem.Content>
      <TextBlock TextWrapping="WrapWithOverflow">
        FontWeight property information goes here.
      </TextBlock>
    </TabItem.Content>
  </TabItem>

  <TabItem Name="fontsize" Header="FontSize">
    <TabItem.Content>
      <TextBlock TextWrapping="WrapWithOverflow">
        FontSize property information goes here.
      </TextBlock>
    </TabItem.Content>
  </TabItem>
</TabControl>

这篇关于如何在 WPF 中构建垂直选项卡集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆