You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Showing dialog and then setting its visibility to false closes the dialog window, then on calling ShowDialog again the following exception is received:
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.InvalidOperationException: Cannot re-show a closed window.
To Reproduce
create new dialog window: private DialogWindow dialogWindow = new DialogWindow();
show dialog window dialogWindow.ShowDialog(this);
set: IsVisible = false;
re-show dialog dialogWindow.ShowDialog(this);
Exception is thrown
Expected behavior
Dialog window is not actually closed, but is just hidden
No exception is thrown on dialog re-open
Avalonia version
11.2.3
OS
macOS, Windows, Linux
Additional context
as an alternative Hide() is hiding window as expected
The text was updated successfully, but these errors were encountered:
And it seems to work fine. I think the check in IsVisibleChanged can be removed.
There does seem to be another problem (at least on Windows) where hiding a modal window causes the parent window to be sent behind the previously activated application.
Describe the bug
Showing dialog and then setting its visibility to false closes the dialog window, then on calling ShowDialog again the following exception is received:
To Reproduce
create new dialog window:
private DialogWindow dialogWindow = new DialogWindow();
show dialog window
dialogWindow.ShowDialog(this);
set:
IsVisible = false;
re-show dialog
dialogWindow.ShowDialog(this);
Exception is thrown
Expected behavior
Avalonia version
11.2.3
OS
macOS, Windows, Linux
Additional context
as an alternative Hide() is hiding window as expected
The text was updated successfully, but these errors were encountered: