c# - Windows 10(现代)通用应用程序平台(UWP)消息框

标签 c# windows visual-studio-2015 win-universal-app

<分区>

我如何在 Windows 10(现代)通用应用程序平台 (UWP) 上制作消息框,就像在 Windows 经典形式 (messagebox.show) 上一样? 谢谢

最佳答案

对于通用应用程序,新 API 要求您使用 await

MessageDialog().ShowAsync() (in Windows.UI.Popups) 
// to bring it into line with Win 8.1.

var dialog = new MessageDialog("Your message here Hello");
await dialog.ShowAsync();

关于c# - Windows 10(现代)通用应用程序平台(UWP)消息框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35393494/

相关文章:

c# - 没有 FFT 的一维快速卷积

c# - 正则表达式不起作用

c - Linux 原生 C 库 : How to configure Visual Studio Code to work with them on Windows?

windows - PrintWindow 位图不同于 PrintScreen Key 位图

c++ - Microsoft VS2015 C++ Core Guidelines分析: "no array to pointer decay (bounds.3)" for vtable?

java - 为什么 Visual Studio 尝试使用错误的 JDK 版本?

visual-studio-2015 - 使用Visual Studio和Typescript 2.0.3从类型转换为@types

c# - 在gridview中使用内置的“编辑”和“删除”按钮。 ASP.NET C#

c# - Spring.Net 引用字典项

c++ - 在 C++ 中的 Windows 串行端口上设置 low_latency 标志