Windows.UI.Popups.MessageDialog does not work for Windows 10 IoT

こ雲淡風輕ζ 提交于 2020-01-16 04:50:09

问题


            await new Windows.UI.Popups.MessageDialog("Test").ShowAsync();

Has anyone else noticed this? Is there an easy work around ?


回答1:


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



来源:https://stackoverflow.com/questions/32128436/windows-ui-popups-messagedialog-does-not-work-for-windows-10-iot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!