Answer the question
In order to leave comments, you need to log in
Error opening wpf form?
There is an application in which a bunch of windows form
And I added one wpf form there.
I call them two in sequence
new WpfForm().showDialog();
new WpfForm().showDialog();
Those first opens, I close it and opening the second.
But when opening the second one, an error occurs in the place of InitilizeComponent ()
Here is the picture:
Great gods of Ktun, solve this problem!
Answer the question
In order to leave comments, you need to log in
Most likely, you have the Application object you are creating set to close the application when the last form is closed.
Your first form closes and at that moment Application sees that there are no more forms - it closes itself. And you immediately try to create and run a new form.
Set Application.Current.ShutdownMode to OnExplicitShutdown
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question