I'm trying to replicate a tab control in the Windows 8 //BUILD release. I’m not talking about your traditional tab control with grey tabs and a static appearance; rather something that we’ve seen throughout the demos at //BUILD; a set of clean links at the top of the app that flip to different sections of the app. Something… Metro-ish:

Zune's tabs

For now, I’m baking my own very simple analog. The setup is like this: The links are a set of items in a ListView control, and the tab content is a set of FlipViewItems within a FlipView control. The list’s SelectedIndex is [two-way] bound to the FlipView’s SelectedIndex, so they work in sync.

<ListView x:Name="lstTabs" SelectionMode="Single"
  SelectedIndex="{Binding SelectedIndex, ElementName=TabFlipView, Mode=TwoWay}">
    <ListView.ItemsPanel>
        <ItemsPanelTemplate>
            <StackPanel Orientation="Horizontal"/>
        </ItemsPanelTemplate>
    </ListView.ItemsPanel>
    <TextBlock>Settings</TextBlock>
    <TextBlock>Favourites</TextBlock>
</ListView>

<FlipView x:Name="TabFlipView">
    <FlipViewItem>
      <TextBlock>Settings go here</TextBlock>
    </FlipViewItem>
    <FlipViewItem>
      <TextBlock>Favourites go here</TextBlock>
    </FlipViewItem>
</FlipView>

As you can see, it’s not perfect. At the very least, you would want to create a different style for the listbox so that the selected item looks a little different. However, it’s really easy to get going with, and will do for now. One nice thing is that the FlipView control gives you free animations, so it looks fluid.

Another twist on this is instead of using a FlipView, you can create a Frame control, and then on the ListView’s selection change event you can load different pages into the frame depending on what’s selected.