Access Device display info in .net MAUI

Alwin 5 Reputation points
2023-05-14T20:10:44.35+00:00

I am trying to access the device info, to read the width and height, in order to show the desktop app in maximized mode on start up, for all the resolutions. But I am getting 0, as shown in the image. Any other thoughts on accessing the screen height/width in MAUI?
User's image

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,103 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,534 questions
{count} votes