WPF 主界面 更换字体 可全局 但是有的时候有的窗体 字体还是没变 可以做全局样式
-
<Window x:Class=
"CLeopardTestWpf.MainWindow"
-
xmlns=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-
xmlns:x=
"http://schemas.microsoft.com/winfx/2006/xaml"
-
Title=
"MainWindow" Height=
"414" Width=
"615" FontFamily=
"Comic Sans MS">
Global Style
-
<Application.Resources>
-
<Style TargetType=
"{x:Type TextElement }">
-
<Setter Property=
"FontFamily" Value=
"Comic Sans MS"/>
-
<Setter Property=
"FontSize" Value=
"30"/>
-
</Style>
-
<Style TargetType=
"{x:Type TextBlock }">
-
<Setter Property=
"FontFamily" Value=
"Comic Sans MS"/>
-
<Setter Property=
"FontSize" Value=
"30"/>
-
</Style>
-
</Application.Resources>