<ControlTemplate TargetType="TabItem">
<Border x:Name="Border" Margin="{TemplateBinding Margin}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource DarkGray}" CornerRadius="5,5,0,0">
<ContentPresenter x:Name="Content" ContentSource="Header"
TextElement.FontSize="14" TextBlock.TextAlignment="Center"
HorizontalAlignment="Center" RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center">
</ContentPresenter>
</Border>
在上面的代码中,ContentPresenter标记内将有一个默认文本块。我需要为该Textblock设置填充。
TextBlock.Padding =“8”
不起作用。如何为该TextBlock设置填充。