I\'m working on a C#/XAML Metro style app for Windows 8. The XAML in WinRT does not have a \"tab\" control. However, I\'m trying to emulate the way a result in the Windows 8 sto
Styling a ListBox is preferable to styling a radio button group.
The following code uses a ListBox with a horizontal stack panel to create the tab item header. A ContentControl displays the tab content as a user control.
I've only tested this with WPF, but hopefully it will work on WinRT.

View model
public class MyTabViewModel : INotifyPropertyChanged
{
public MyTabViewModel()
{
Items =
new List
{
new MyTabItem
{
Title = "Overview",
Content = new UserControl1()
},
new MyTabItem
{
Title = "Detail",
Content = new UserControl2()
},
new MyTabItem
{
Title = "Reviews",
Content = new UserControl3()
},
};
}
public IEnumerable Items { get; private set; }
private MyTabItem _selectedItem;
public MyTabItem SelectedItem
{
get { return _selectedItem; }
set
{
_selectedItem = value;
PropertyChanged(this, new PropertyChangedEventArgs("SelectedItem"));
}
}
#region Implementation of INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;
#endregion
}
public class MyTabItem
{
public string Title { get; set; }
public UserControl Content { get; set; }
}