public override void OnFrameworkInitializationCompleted() { Selection.CreateBrushes(); ConnectionModel.CreateBrush(); StandardGrid.CreatePen(); switch (ApplicationLifetime) { case null: break; case IClassicDesktopStyleApplicationLifetime desktop: desktop.MainWindow = new MainWindow(); break; default: throw new PlatformNotSupportedException(); } base.OnFrameworkInitializationCompleted(); }