Inaccurate results when getting the user's screen dimensions for macOS

67 Views Asked by At

So I'm having an issue with retrieving the dimensions of the user's screen when running either a .NET MAUI or .NET MAUI Blazor app. I've tried 'DeviceDisplay.Current.MainDisplayInfo', but the dimensions for the Height and Weight are both inaccurate. I'm running the app in Visual Studio Community for Mac 2022, targeting MacCatalyst on a 2019 16 inch MacBook Pro running the latest macOS Sonoma. The dimensions should be 3072 × 1920. Yet 'DeviceDisplay.Current.MainDisplayInfo' is giving me a Width of 3584 and a Height of 2240.

Any help with this would be greatly appreciated!

0

There are 0 best solutions below