【问题标题】:How to change FontFamily of Window form?如何更改 Window 窗体的 FontFamily?
【发布时间】:2010-01-07 06:56:24
【问题描述】:

即使我已经设置了这些属性,我也无法更改窗口窗体标题的字体族或字体样式。默认字体族是 MS UI Gothic,我想更改为 meiryo。在 XML 文件中,看起来还可以,但没有任何更改在运行时。

 <Window x:Class="TestFont.Window1"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   Title="Window1" Height="130" Width="369" FontFamily="meiryo"  FontStyle="Italic">
</Window>

【问题讨论】:

    标签: wpf fonts font-family


    【解决方案1】:

    窗口标题是窗口的 非客户端 区域的一部分,并没有真正由 WPF 呈现。更改该字体的唯一方法是修改显示属性(Windows 范围的设置)。

    【讨论】:

      【解决方案2】:

      您无法更改标题文本的外观。它由使用的主题、个人设置等决定,因此根据用户的喜好在每台计算机上都不同。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-08-21
        • 2021-05-19
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多