WPF Pixels to desktop pixels

后端 未结 2 1225
春和景丽
春和景丽 2021-01-13 20:30

I\'ve been linked in the past to this response to a similar question on converting WPF pixel coordinates to desktop ones, however I\'m not sure I understand the maths involv

相关标签:
2条回答
  • 2021-01-13 21:02

    How about built-in PointToScreen and PointFromScreen methods? Or am I missing something?

    0 讨论(0)
  • 2021-01-13 21:02

    WpfUnit is coming out as zero because it's doing integer math with the 1/96. Explicitly declare those numbers as floats.

    0 讨论(0)
提交回复
热议问题