I would probably use an Horizontal StackPanel that contains radio buttons to manage the tab :
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<RadioButton VerticalAlignment="Top"
Height="30"
Width="100"
Content="Tab1"
Style="{StaticResource tabishRadioButton}"
Checked="RadioButton_Checked"/>
<RadioButton VerticalAlignment="Top"
Height="30"
Width="100"
Content="Tab2"
Margin="2,0,0,0"
Style="{StaticResource tabishRadioButton}"
Checked="RadioButton_Checked_2"/>
</StackPanel>
I would then add a border to draw the "tabcontrol" border and add grids for each tabs I want to use. I would then simply change their visibility property to collapsed or visible based on the radio button values :
<Grid x:Name="LayoutRoot" Background="White">
<Grid.Resources>
<Style TargetType="RadioButton"
x:Key="tabishRadioButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid x:Name="RootElement">
<Border x:Name="tabBorder"
BorderBrush="Black"
BorderThickness="1"
Background="White"
CornerRadius="4,4,0,0">
<ContentPresenter Content="{TemplateBinding Content}"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<RadioButton VerticalAlignment="Top"
Height="30"
Width="100"
Content="Tab1"
Style="{StaticResource tabishRadioButton}"
Checked="RadioButton_Checked"/>
<RadioButton VerticalAlignment="Top"
Height="30"
Width="100"
Content="Tab2"
Margin="2,0,0,0"
Style="{StaticResource tabishRadioButton}"
Checked="RadioButton_Checked_2"/>
</StackPanel>
<Border BorderBrush="Black"
Grid.Row="1"
BorderThickness="1,1,1,1">
<Grid>
<Grid x:Name="tab1Content"
Visibility="Collapsed">
<Border Background="Red"/>
</Grid>
<Grid x:Name="tab2Content"
Visibility="Collapsed">
<Border Background="Blue"/>
</Grid>
</Grid>
</Border>
</Grid>
A lot of the work would consist of making this visually appealing :) but this would be how I would start to do a tabControl ... without the control :) Good luck !
Mathieu Drimonakos
Technical Designer
www.xceed.com