I tried the following:
var loginWindow =
// Try and do something...
And it works just fine. First time didn't put IniitializeComponents() and it was working as you said. After that I tried using WPF Window instead of RadWindow and the same thing happend. What I suspect is that if you show another window before setting a MainWindow, when this window is closed the application ends.
What I could suggest you is to either use this code (call InitializeComponents before showing your login) or to move this code in the constructor of your main window.
Hope this helps.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items.