I will try to explain what I like to do :
I have a App that has a DefaultWindow for startup.
Now I would like to add some code in the App.Open event that checks some folder and file existants.
If there are files in the folder then the App should start with the DefaultWindow but when there are no files in the folder the App should first run another Window to manage the files in the folder.
The problem is that when there are no files in the folder the other window opens, but also the DefaultWindow opens.
How can I prevent the DefaultWindow to open before the other window is closed.
I think I found a solution.
I set the DefaultWindow to None.
In the code (App.Open) I check the folder.
Depending on the result I open the other window as ShowModal or I continue the normal flow.
At the end of the App.Open I show the window that normally was set as DefaultWindow.
It works fine this way. Is this a correct way to handle my problem ?