WinUI 3 window does not open in fullscreen after closing in fullscreen to the system tray

youki 1,016 Reputation points

I am not sure, if this is a bug or if i have to handle it myself.
It is a unpackaged c++ app and the window is callable (can be opened) by an icon in the system tray.
It is like the title says. If i open the window and maximize it by double clicking in the title bar, the window gets maximized to fullscreen and fills the entire monitor.
If i close the window by the red x button as desired (the application is still running) and i open it again by the system tray icon, the window is not maximized.
Is this a bug, should not the application save the window state automatically?

It is weird because it saves the state when it's not maximized to fullscreen.


Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
749 questions
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,628 questions
{count} votes

1 answer

Sort by: Most helpful
  1. youki 1,016 Reputation points

    Got it fixed:

    Not this:

    ShowWindow(MainWindow::s_handle, SW_NORMAL);  


    ShowWindow(MainWindow::s_handle, SW_SHOW);  

    Thank you.

    0 comments No comments