Hi everyone,
I'm trying to preset the window size and position for webView2 exports and I'm running into a few issues.
1. This is probably a bug I should report, but I noticed that when using Windows Scale to anything higher than 100% the platformInfo.ScreenWidth return a lower value than what the screen actually is. On 1920x1080, I get 1536 width with scale set to 125%. Though setting the window width to screenWidth does cover the whole surface, so maybe it is by design.
2. Another small issue I noticed is that setting the window position (with the browser object) to 0,0 doesn't really put it on the edge, I need to set it to -7.5,0 for it to be aligned left, this also happens with 100% Scale.
3. Probably the most important issue, If I use two screens with extended layout. When running the exe from the first screen it works fine, but if I run it from the second screen, using -7.5 position for the X puts the window on the first screen (screen width does return the second screen width, so I get a big window that overflow into the second screen).
Is there a way to get the X,Y coordinates of the screen the app runs on?
Alternatively, is there a way to know if two or more screens are used, get the width and position of each of them and know on which of the screens the app is running?
4. Is there a way to set the window to maximize?
Ashley Any insight?