<Border CornerRadius="2,2,0,0" BorderThickness="2,2,2,0"/>
它将左上角和右上角半径设置为2,左上角和右上角边界部分设置为2。
更新:
也可以创建自定义装饰器。提供更多信息
by this MSDN Article
只需在TabItem控件模板中添加一些自大小的几何体。提供更多信息
this MSDN Article
样品
<Style TargetType="{x:Type TabItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Grid>
<Viewbox Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Stretch="Fill" StretchDirection="DownOnly">
<Path x:Name="path" Stretch="Fill" Stroke="Black" Fill="{StaticResource LightBrush}" Width="Auto" Height="Auto" Data="M 0,20 L 0,5 5,0 100,0 100,20 "/>
</Viewbox>
<Border Visibility="Visible"
x:Name="Border"
Margin="5,1,0,1" >
<ContentPresenter x:Name="ContentSite"
VerticalAlignment="Center"
HorizontalAlignment="Center"
ContentSource="Header"
Margin="12,2,12,2"
RecognizesAccessKey="True"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Panel.ZIndex" Value="100" />
<Setter TargetName="path" Property="Fill" Value="{StaticResource WindowBackgroundBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="path" Property="Fill" Value="{StaticResource DisabledBackgroundBrush}" />
<Setter TargetName="path" Property="Stroke" Value="{StaticResource DisabledBorderBrush}" />
<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>