Very newbie question.
I want to overwrite the Main in my WPF app so if I double-click on a file, it will be loaded. My main function is:
[STAThread]
static void Main(string[] args)
{
FileConvert.App app = new FileConvert.App();
app.InitializeComponent();
if (args.Length > 0)
{
Window1 wnd1 = (Window1)(app.MainWindow);
wnd1.SetProjectFile(args[0]);
}
app.Run();
My problem is that wnd1 is null. How do I get access to this window so I can pass it the filename to load?
Thanks!