dotMorten / WinUIEx

WinUI Extensions
https://dotmorten.github.io/WinUIEx
MIT License
572 stars 36 forks source link

Use ContentCoordinateConverter for screen <--> window coordinate conversion #143

Open dotMorten opened 8 months ago

dotMorten commented 8 months ago

Instead of getting DPI and doing conversions, consider changing all that code to use the ContentCoordinateConverter: https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentcoordinateconverter?view=windows-app-sdk-1.4

image