Example #1
0
        public void RunApp()
        {
            var app = new App();

            app.Run();

            app.Shutdown();
        }
Example #2
0
		static void Main()
		{
			App app = new App
			{
				ShutdownMode = ShutdownMode.OnExplicitShutdown
			};
			app.InitializeComponent(); 
			SynchronizationContext.SetSynchronizationContext(new DispatcherSynchronizationContext());

			Program4a p = new Program4a();
			p.ExitRequested += (sender, e) =>
			{
				app.Shutdown();
			};
			Task programStart = p.StartAsync();

			app.Run();
		}
 /// <summary>
 ///     <para>Instantiates the MainViewModel class</para>
 /// </summary>
 /// <param name="app"></param>
 public MasterViewModel(App app)
 {
     m_app = app;
     ExitCommand = new RelayCommand((o) => m_app.Shutdown(), (o) => true);
 }