UWP Modal Window

前端 未结 3 1634
孤独总比滥情好
孤独总比滥情好 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:25

    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

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-12-17 06:46

    It is possible to create a movable window, but you can't make it modal.

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f1328991-b5e5-48e1-b4ff-536a0013ef9f/is-it-possible-to-open-a-new-window-in-uwp-apps?forum=wpdevelop

    0 讨论(0)
提交回复
热议问题