Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window does not take into account the specified Height and Width if it is launched in the minimised state #13300

Closed
flexxxxer opened this issue Oct 18, 2023 · 0 comments · Fixed by #14470
Labels
bug help-wanted A contribution from the community would be most welcome. os-windows

Comments

@flexxxxer
Copy link
Contributor

Describe the bug

If you set the Window.WindowState property in the constructor to WindowState.Minimised, then the window after unfolding (transition to WindowState.Normal) will not take into account the previously set (for example, through ViewModel or just in the constructor) Window.Width and Window.Height.

To Reproduce

  1. Clone this repo
  2. See these lines: MainWindow.Width, .Height and .WindowState are set in the constructor.
  3. Build and run app: window will be in minimized state.
  4. After opening an application window (e.g. clicking in the taskbar), the application window will have a different size than the one specified.

Expected behavior

Application window size after application opening corresponds to the values set in the constructor.

Screenshots

video_H.264.mp4

Environment

  • OS: Windows 11
  • Avalonia-Version: reproduced on 0.10.5, 0.10.10, 0.10.21, 11.0.0, 11.0.1, 11.0.2, 11.0.3, 11.0.4, 11.0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help-wanted A contribution from the community would be most welcome. os-windows
Projects
None yet
2 participants