I want to show a modal window on the screen in my Universal Windows Platform app (C#), just like the standard Mail-app does when you add an account. Or when you're signing in to a service (like facebook) in an app.
Windows mail app with modal window:
You can move this window around, but it's not in the taskbar and it is modal.
Does anyone know how to do this? It shouldn't be so hard but i can't find anything about it.
As @Daniel Meixner said, adding account interaction of this Mail app is calling another app possible with LaunchForResults.
Using Task Manager
of system, you can see that, when you launch this Mail app, it starts a process with the app's name "Mail", and when you add an account from this app, it starts another process with the app's name "Email and accounts".
If we use the Process Explorer to check on these processes, the Mail app's process is this:
and the add account process is this:
They are in different processes and have different package names.
So I created two apps and use LaunchForResult
for communication between these apps, they act just like the Mail app of system.
If you just want to launch the system's "add account" app, you can refer to the official UserDataAccountManager sample.
In the mail app what's happening might be app to app communication with "LaunchForResults" - I'm not sure, but it looks like that.
With Windows 10 Universal Apps you can make one app call another app with LaunchForResults. The called app will always behave like a modal dialog to the calling app. You can pass any serializable objects in both directions using ValueSets.
Details for LaunchForResult can be found here: https://msdn.microsoft.com/en-us/library/windows/apps/mt269386.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With