Пример #1
0
		static void Main()
		{
			AppNoStartupUri app = new AppNoStartupUri
			{
				ShutdownMode = ShutdownMode.OnExplicitShutdown
			};
			app.InitializeComponent();

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

			app.Run();
		}
Пример #2
0
        static void Main()
        {
            AppNoStartupUri app = new AppNoStartupUri
            {
                ShutdownMode = ShutdownMode.OnExplicitShutdown
            };

            app.InitializeComponent();

            Program4 p = new Program4();

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

            app.Run();
        }