Reputation: 772
I have found several similar questions, but nothing that fits perfectly.
I want my main window to show up first, and if the application can't find an application configuration file I want it to pop up a dialog box to get some necessary values from the user.
If I do anything in App.xaml etc - then obviously the main window won't be open, the same goes for if I put it in my main window's OnInitialized
. If I put it in OnActivated
, it seems to work, but when I close the dialog or somehow click on the main window it pops up another copy of the dialog. I could put a bool in my main window that indicates whether the dialog box is open already, but that just doesn't seem optimal or the best way of doing things.
Any suggestions?
Upvotes: 1
Views: 1546