Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple instances of a Windows Universal App (Windows 10)

I'm beginning to develop apps for the Universal Windows Platform (Windows 10), and I'm making an app that needs to be able to run on multiple instances. I've seen that this is possible with the universal apps as there are some apps that can already do this (e.g. Calculator, Edge).

I have already tried searching on Google, on Microsoft's API reference, and here to no avail. I'd really appreciate your help.

like image 908
Yaroslav de la Peña Smirnov Avatar asked Sep 27 '15 10:09

Yaroslav de la Peña Smirnov


1 Answers

UWP/store apps use no multiinstance, but use multi-view style. (Edge is an exception, maybe...)

In multi-view, the instance is same but each windows' 'Views' are running on each threads.

Design guideline: Guidelines for multiple windows

Sample: MultipleViews Sample

[Added Feb 2018] From Windows 10 RS4 (1803), we can use the 'true' multi instance with UWP App :) Applicable device families are Desktop and IoT. This is a sort of 'opt-in' option - you need to declare it on your application manifest to use it. The detail and samples available on the following Microsoft Docs site.

Create a multi-instance Universal Windows App


[Added June 2017] As of build2017 presentations, it seems that Microsoft have a plan to extend their UWP App model to allow the real "Multi Instance" by their future Update of Windows. But the details are not available yet.


[Added 2015] I've uploaded the sample bogusCalc to my OneDrive.

This is based on VS2015 'blank' template and ViewLifetimeControl.cs, picked from multiple views sample. Each time you start the bogusCalc from the start menu, Application::OnLaunched is invoked.

screenshot of boguscalc =)

like image 93
Mamoru Satoh Avatar answered Dec 10 '22 16:12

Mamoru Satoh