I'm trying to port an application of mine from Java to C# and I can't for the life of me wrap my head around Wpf application structure.
In Java my application runs the main() method which registers native hooks and calls launch(args) for my Application class, which sets up the GUI and starts the FXApplication. I have another thread, which is run from the GUI class (for running robot scripts) can be started and stopped with f4 and f5 respectively, hence the native hooks.
In C# I can't figure out how to achieve the same effect. Without a main method I don't understand how you initialize objects outside of the scope of the MainWindow and run other threads without coupling the GUI to everything.