With this code I can deserialize created files with my app:
[STAThread]
static void Main(string[] args)
{
var application = new App();
application.InitializeComponent();
application.Run(args.Length == 0 ? new MainWindow() : new MainWindow(args[0]));
//When passing a argument in mw constructor the deserialization will be called
}
My problem is that when the app is already opened, I'll get a new instance of my app. How can I detect whether it is still opened that my file will be opened in the right instance?
Thanks!