예제 #1
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();
		}
예제 #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();
        }