diff --git a/src/Windows/Avalonia.Win32/WindowImpl.cs b/src/Windows/Avalonia.Win32/WindowImpl.cs index e2fb60f4cad7..ca1afc9b6e56 100644 --- a/src/Windows/Avalonia.Win32/WindowImpl.cs +++ b/src/Windows/Avalonia.Win32/WindowImpl.cs @@ -1203,6 +1203,11 @@ private void ShowWindow(WindowState state, bool activate) if (command.HasValue) { UnmanagedMethods.ShowWindow(_hwnd, command.Value); + + if (!_shown && command.Value != ShowWindowCommand.Minimize && GetStyle().HasFlag(WindowStyles.WS_VISIBLE)) + { + _shown = true; + } } if (state == WindowState.Maximized)