问题描述
await new Windows.UI.Popups.MessageDialog("Test").ShowAsync();
有没有其他人注意到这一点?有没有简单的解决方法?
Has anyone else noticed this? Is there an easy work around ?
推荐答案
我遇到了一些问题,但我没有找到任何技巧.我为自己制作了一个带有 a 的 MessageDialog 并且构建它并不难.尝试看看这个 http://bitaware.altervista.org/messagedialog-for-iot/唯一的问题是它不能跨平台工作.如果你想要这种行为,你必须得到一个条件
I have the some problem and I did't found any trick. I made myself a MessageDialog with a and It's not so hard to build it. Try do take a look this http://bitaware.altervista.org/messagedialog-for-iot/The unique problem is that it do not work across platforms. If you would this behavior you have to get a condition
string platform = AnalyticsInfo.VersionInfo.DeviceFamily;
if (platform == "Windows.IoT")
{
//Your code for IoT
}
else
{
//Your code for other devices
}
我知道不优雅但我认为我们别无选择.希望对你有帮助
I know is not elegant but I think we have no other choice.I hope it was helpful
这篇关于Windows.UI.Popups.MessageDialog 不适用于 Windows 10 IoT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!