Wpf 如何更改窗体的FontFamily?

Wpf 如何更改窗体的FontFamily?,wpf,fonts,font-family,Wpf,Fonts,Font Family,我无法更改窗体标题的fontfamily或fontstyle,即使我已经设置了这些属性。默认的fontfamily是MS UI Gothic,我希望更改为meiryo。在XML文件中,它似乎可以,但在运行时没有任何更改 <Window x:Class="TestFont.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.micro

我无法更改窗体标题的fontfamily或fontstyle,即使我已经设置了这些属性。默认的fontfamily是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并没有真正呈现该窗口。更改该字体的唯一方法是修改显示属性(Windows范围的设置)

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