I created an empty project in Visual Studio and added the required assembly references, a class with a static Main function and a WPF Window.
I then create an instance of the Window and show it, but after execution everything closes as there is nothing keeping the thread open/running.
Adding a while(true)
loop keeps it open but freezes the primary thread.
Adding the while(true)
loop to a new thread keeps that thread open but the primary thread still finishes execution closing everything else.
How would I keep the application open?