Converting between WPF font size and “standard” font size

后端 未结 2 508
太阳男子
太阳男子 2021-02-05 04:12

I\'ve noticed in WPF, the default font size of 12 points is roughly equivalent to 9 points in \"normal\" applications (e.g. WordPad), 10 pt in WPF is roughly 7 pt standard, and

2条回答
  •  我在风中等你
    2021-02-05 04:37

    Another method for conversion if you're going from point to WPF double is to use the System.Windows.FontSizeConverter class:

    double sizeForWpf = (double) new FontSizeConverter().ConvertFrom("10pt");
    

提交回复
热议问题