UWP Modal Window

前端 未结 3 1644
孤独总比滥情好
孤独总比滥情好 2020-12-17 05:59

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

3条回答
  •  再見小時候
    2020-12-17 06:28

    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.

提交回复
热议问题