Open a new window in a new window

So, I can open new windows in WPF, but what I'm trying to do is open a new window (window2 will call it). I want to open another window (window3) from window2, but when I paste the code it will not allow me.

In my mainWindow:

var newWindow = new window2();
newWindow.ShowDialog();

but in window2, if I use the same code to open a new window:

var newWindow = new window3();
newWindow.ShowDialog();

it will not let me use Show () or ShowDialog ().

So I wondered if a 3rd window like this can open, or is there something I can't see, or is there something else I can do?

+3
source share
1 answer

ShowDialog is modal (all input is limited to this window). You must close the modal window before opening any other windows, that’s it!

? , .

+1

All Articles