Windows.UI.Popups.MessageDialog does not work for

2019-08-05 01:20发布

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

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

1条回答
一夜七次
2楼-- · 2019-08-05 02:08

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

查看更多
登录 后发表回答