Exemple #1
0
        private void Desktop_Startup(object sender, ControlledApplicationLifetimeStartupEventArgs e)
        {
            MessageHandlers.RegisterMessageHandlers(this);

            AppViewModel.Initialize(e.Args);

            if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
            {
                var window = new MainWindow
                {
                    VM = new MainViewModel()
                };
                desktop.MainWindow = window;
            }
        }
Exemple #2
0
 private void Desktop_Exit(object sender, ControlledApplicationLifetimeExitEventArgs e)
 {
     MessageHandlers.UnregisterMessageHandlers(this);
 }