Providing FontFamily on Window of WPF

40 views Asked by At

I have using <Window FontFamily="Fonts/fontName.ttf#font Name" on my existing Window and it works correctly.

But when I try to Create Window like this, the font isn't usable:

MainWindow newWindow = new MainWindow();
newWindow.FontFamily = new FontFamily("Fonts/fontName.ttf#font Name");
newWindow.FontSize = 16;
0

There are 0 answers