Stupidly simple question I can't figure out.

I have a WPF application, and I want to display a Logon dialog box first (before the main window shows up).

If the user logs on successfully, then I want to show the main window, if not, I want to exit the application.

How does one do this correctly?

wpf
Edit
Report