mgaffigan / WpfAppBar

AppBar implementation for WPF
MIT License
68 stars 10 forks source link

Ghost Window on minimize #7

Closed Tisonus closed 9 months ago

Tisonus commented 9 months ago

Following up on #1 How to Minimize a Window with AppBar?, I am facing the problem that on minimizing the App bar with WindowState = WindowState.Minimized; the AppBarWindow is minimizing but a somewhat ghost window is still visible. grafik

mgaffigan commented 9 months ago

AppBars do not have a well defined minimized behavior. Consider using Window.Hide and Window.Show instead of Minimize/Restore.

Tisonus commented 9 months ago

With Window.Hide and Window.Show, the Taskbar element is hidden too. But I found a solution to avoid the ghost window and minimize the AppBar to the Taskbar: Before minimizing the Window, I set MinWidth = 0 DockedWidthOrHeight = 0 ShowAppInTaskbar = true When StateChanged to WindowState.Normal, I set it back to the old values.

mgaffigan commented 9 months ago

This should be resolved without needing a workaround in afdbfc6ebe7a68ab47ce010c8d9bdcb44893c57c / 2.0.3