locked
Windows 10 can run multiple instances of UAP program

All replies

  • If possible, can you translate this question in English (since this is a EN-US language) forum or post it to the appropriate language forum if translation is not an option?

    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    Friday, April 17, 2015 4:58 PM
    Moderator
  • The answer is yes.
    Friday, April 17, 2015 5:08 PM
  • @Kingreat, there is only a single instance of the app executable running at once, meaning if you have Foo.exe, there is only one instance running at once. You cannot have multiple instances of Foo.exe running as a UAP app.

    However, you can create "Views" from your app, the multiple views sample shows how to generate multiple views in your app: https://code.msdn.microsoft.com/windowsapps/Multiple-Views-Sample-2582fcf3. A "View" will act as a separate "window", but it is still tied to the app itself. When you terminate the app, all the "views" will terminate with the app.


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    Friday, April 17, 2015 8:41 PM
    Moderator
  • @Prashant H Phadke

    Thank you!

    I tried to use multipe view to implement it.

    But it does not work.

    The following code is work well on winodows 8.1 windows store app, but not windows 10 UAP. Can you point where is wrong?

    {

               

    int viewID = -1;
    await CoreApplication.CreateNewView().Dispatcher.RunAsync(

    Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                {
                    CoreWindow window = CoreWindow.GetForCurrentThread();
                    viewID = ApplicationView.GetApplicationViewIdForWindow(window);
                    Frame frame = new Frame();
                    frame.Navigate(typeof(ScanPage), null);
                    Window.Current.Content = frame;
                });
                await ApplicationViewSwitcher.TryShowAsStandaloneAsync(viewID);

    }


    • Edited by Kingreat Monday, April 20, 2015 9:04 AM
    Monday, April 20, 2015 4:35 AM
  • @Prashant H Phadke

    I'm sorry for ask in Chinese, and thank you for your patience.

    • Edited by Kingreat Monday, April 20, 2015 9:05 AM
    Monday, April 20, 2015 6:15 AM
  • @RandyPete

    Thank you for your answer, and can you tell me how to implement it ?

    Monday, April 20, 2015 9:08 AM