Fullscreen window width greater than screen width
See original GitHub issueDescribe the bug When the application is in the fullscreen state the width is greater than my screen size. This may cause some elements to be not fully displayed.
To Reproduce Steps to reproduce the behavior:
- Create a new project from
Avalonia MVVMtemplate - Add
ExtendClientAreaToDecorationsHint="true"toMainWindow.axaml - Change the alignment of the text to
HorizontalAlignment="Left" - Run the app and change the state to fullscreen
Expected behavior The message should be fully visible
Screenshots
Screen from the debugger (My screen resolution is 1920x1080px):

Example of the bug:

Desktop (please complete the following information):
- OS: Windows 10
- Version 0.10.0
Additional context
At first, I thought it is the bug in https://github.com/AvaloniaUI/XamlControlsGallery/issues/8 , but it is reproducible for all windows that use ExtendClientAreaToDecorationsHint="true".
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Why is window.innerWidth smaller than screen.width even ...
When my browser window is in full screen mode, the inner width of the window still seems to be smaller than my screen...
Read more >why is reported screen size smaller than display ...
It seems like full screen mode is "inheriting" the dimensions of that temporary window once it gets to full screen.
Read more >Window size displayed as bigger than my screen resolution?
Yes, that is an interesting observation. You have probably maximized your Form1 before you took its size. Now, what Windows does when it ......
Read more >Screen: width property - Web APIs - MDN Web Docs
The Screen.width read-only property returns the width of the screen in CSS pixels.
Read more >JavaScript Window Screen
Window Screen Width The screen.width property returns the width of the visitor's screen in pixels.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is a Win32 thing. To hide the system border when maximized, Windows enlarges the window ~8px on each side, but when the frame is extended, windows doesn’t turn this logic off automatically and requires special handling of
WM_NCCALCSIZEto adjust the client rect which is now the whole window.The simplest solution though is just to add 8px of padding to the window only when maximized:
It hasn’t been fixed yet, the issue can be reproduced in version 0.10.13