Closed
Description
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
- Clone this repo
- See these lines:
MainWindow.Width
,.Height
and.WindowState
are set in the constructor. - Build and run app: window will be in minimized state.
- 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