[size=medium]去掉StartupUri="Login.xaml"[/size]
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
try
{
base.OnStartup(e);
Login mainWin = new Login();
mainWin.Show();
}
catch(Exception ex)
{
MessageBox.Show(App.Current.MainWindow as Login,ex.Message,"系统错误",MessageBoxButton.OK,MessageBoxImage.Error);
App.Current.Shutdown();
}
}
}