UWP Modal Window(UWP 模态窗口)
问题描述
我想在我的通用 Windows 平台应用程序 (C#) 的屏幕上显示一个模式窗口,就像添加帐户时的标准邮件应用程序一样.或者当您在应用中登录服务(如 facebook)时.
带有模式窗口的 Windows 邮件应用程序:
你可以移动这个窗口,但它不在任务栏中,它是模态的.
有人知道怎么做吗?它不应该那么难,但我找不到任何关于它的东西.
正如@Daniel Meixner 所说,添加此邮件应用程序的帐户交互是调用另一个应用程序可能与
如果我们使用
添加帐户的过程是这样的:
它们在不同的进程中,具有不同的包名.
所以我创建了两个应用程序并使用 LaunchForResult 在这些应用程序之间进行通信,它们的作用就像系统的邮件应用程序一样.
如果你只是想启动系统的添加账户"应用,可以参考官方的UserDataAccountManager 示例.
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.
这篇关于UWP 模态窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:UWP 模态窗口
基础教程推荐
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
