<Window x:Class="WPFapp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="UsingFonts" Height="120" Width="400" >
<StackPanel>
<TextBlock FontFamily="Arial" FontSize="12" FontWeight="Bold">
Arial 12 point bold.
</TextBlock>
<TextBlock FontFamily="Times New Roman">
Times New Roman plain, default size.
</TextBlock>
<TextBlock FontFamily="Courier New" FontSize="16" FontStyle="Italic" FontWeight="Bold">
Courier New 16 point bold and italic.
</TextBlock>
<TextBlock>
<TextBlock.TextDecorations>
<TextDecoration Location="OverLine" />
<TextDecoration Location="Baseline" />
</TextBlock.TextDecorations>
Default font with overline and baseline.
</TextBlock>
<TextBlock>
<TextBlock.TextDecorations>
<TextDecoration Location="Strikethrough" />
<TextDecoration Location="Underline" />
</TextBlock.TextDecorations>
Default font with strikethrough and underline.
</TextBlock>
</StackPanel>
</Window>
WPF的字体样式
最新推荐文章于 2024-09-02 15:46:38 发布