WindowManager.EnsureWindow with splash screen/startup dialog

Sep 16, 2010 at 8:58 PM

I'm having a problem using WindowManager.ShowDialog for a login dialog. I don't want to show the main window until after the dialog closes. But in EnsureWindow(...) setting window.Owner to Application.Current.MainWindow throws an exception stating, "Cannot set Owner property to a Window that has not been shown previously." It seems to me that it would need a delegate to set the owner once the MainWindow is shown. The Visibility property is one possibility, but I'm not sure if there is a better way.