wpftabcontrol

How to build vertical tab sets in WPF?


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.


Solution

  • 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>