Question

So Here is the thing i can open new windows in WPF but what i am trying to do is after opening a new window (lets call it window2) i want to be able to open another new window(window3)from window2 but when i put in the code it wont let me.

On 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 wont allow me to use Show() or ShowDialog().

So what i was wondering was can u open a 3rd window like this or is there something i am missing or is there something different i can do?

Was it helpful?

Solution

ShowDialog is modal (all input constrained to that window). You have to close the modal window before opening any other windows, thats the point of it!

What are you actually trying to achieve? In general modal windows are not a good user experience

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top