How to: Position Tabs on a TabControl

This example shows how to create a TabControl and specify the placement of its tabs. You can place tabs at the top, bottom, left, or right of the control. The example specifies tab placement by setting the TabStripPlacement property.

The following example creates a TabControl by using Extensible Application Markup Language (XAML). It positions the tabs on the left side.

Example

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

For the complete sample, see Tab Control Sample.

The following graphic shows the four different tab placements.


Placement of TabControl Tabs

Tab strip placement

See Also

Tasks

How to: Create a TabControl

Reference

TabControl

Concepts

TabControl Overview