2010-07-29 63 views

回答

1

和WPF中的任何東西一樣,有很多方法。不知道你想做什麼,這裏是一個「例如」(我不會建議使用這種字體組合:))

<TabControl> 
     <TabControl.Resources> 
      <Style TargetType="{x:Type TextBlock}"> 
       <Setter Property="FontFamily" Value="Comic Sans MS" /> 
       <Setter Property="FontSize" Value="20" /> 
      </Style> 

      <Style x:Key="headerStyle" TargetType="{x:Type TextBlock}"> 
       <Setter Property="Control.FontFamily" Value="Papyrus" /> 
       <Setter Property="Control.FontSize" Value="12" /> 
      </Style> 
     </TabControl.Resources> 
     <TabItem> 
      <TabItem.Header> 
       <TextBlock Text="Header" Style="{StaticResource headerStyle}" /> 
      </TabItem.Header> 
      <TextBlock Text="Here is the content" /> 
     </TabItem> 
    </TabControl>