How to set the default font for a WPF application?

后端 未结 6 727
野的像风
野的像风 2020-12-04 11:16

I want to be able to define a font family for my WPF application. Preferably using a resource dictionary as a theme referenced from App.xaml. I\'ve tried creati

6条回答
  •  -上瘾入骨i
    2020-12-04 11:39

    Most of proposed solutions didn't work for me. My simple solution:

    Add this to App.xaml:

    
    

    Add this in your MainWindow constructor (after InitializeComponent):

    Style = (Style)FindResource(typeof(Window));
    

提交回复
热议问题