Skip to content

Instantly share code, notes, and snippets.

@CCInc
Created December 4, 2012 00:59
Show Gist options
  • Save CCInc/4199515 to your computer and use it in GitHub Desktop.
Save CCInc/4199515 to your computer and use it in GitHub Desktop.
<Window x:Class="TestWPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="422" Width="733" WindowStyle="None" AllowsTransparency="True">
<Window.Resources>
<Style TargetType="{x:Type TabItem}">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Grid>
<Border
Name="Border"
BorderBrush="Black"
BorderThickness="0,0,0,0"
CornerRadius="0,0,6,6" >
<Border.Background>
<ImageBrush ImageSource="tab.jpg" Stretch="Fill" AlignmentX="Right" />
</Border.Background>
<ContentPresenter x:Name="ContentSite"
VerticalAlignment="Center"
HorizontalAlignment="Center"
ContentSource="Header"
Width="90"
Margin="20,10,20,10"></ContentPresenter>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="Black" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
</Window.Resources>
<Grid Background="Red">
<Image Height="35" HorizontalAlignment="Left" Margin="0,342,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="143" Source="tab.png" />
<Button Content="Button" Height="24" HorizontalAlignment="Left" Margin="0,353,0,0" Name="button1" VerticalAlignment="Top" Width="121" Opacity="0" />
<Image Height="35" HorizontalAlignment="Left" Margin="284,345,0,0" Name="image5" Source="tab.png" Stretch="Fill" VerticalAlignment="Top" Width="145" />
<Button Content="Button" Height="24" HorizontalAlignment="Left" Margin="284,356,0,0" Name="button5" Opacity="0" VerticalAlignment="Top" Width="121" />
<Image Height="35" HorizontalAlignment="Left" Margin="141,344,0,0" Name="image2" Source="tab.png" Stretch="Fill" VerticalAlignment="Top" Width="145" />
<Button Content="Button" Height="24" HorizontalAlignment="Left" Margin="141,355,0,0" Name="button2" Opacity="0" VerticalAlignment="Top" Width="121" />
<Image Height="35" HorizontalAlignment="Left" Margin="427,346,0,0" Name="image3" Source="tab.png" Stretch="Fill" VerticalAlignment="Top" Width="145" />
<Button Content="Button" Height="24" HorizontalAlignment="Left" Margin="427,357,0,0" Name="button3" Opacity="0" VerticalAlignment="Top" Width="121" />
<Image Height="35" HorizontalAlignment="Left" Margin="566,348,0,0" Name="image4" Source="tab.png" Stretch="Fill" VerticalAlignment="Top" Width="145" />
<Button Content="Button" Height="24" HorizontalAlignment="Left" Margin="566,359,0,0" Name="button4" Opacity="0" VerticalAlignment="Top" Width="121" />
<Image Height="70" HorizontalAlignment="Left" Margin="0,-11,0,0" Name="TopTitle" Stretch="Fill" VerticalAlignment="Top" Width="736" Source="top.png" />
</Grid>
</Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment