Share via


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>

The following graphic shows the four different tab placements.

Placement of TabControl Tabs

Tab strip placement

See Also

Reference

TabControl