Do Windows 8 Store apps have a MessageBox equivalent?

∥☆過路亽.° 提交于 2019-12-29 07:35:07

问题


Do Windows 8 Store apps have something like a MessageBox?

I need something like a popup window to show the user e.g. when a input is wrong or a error happened. Is there something already in the API or do I have to make my own?


回答1:


You're looking for the MessageDialog class




回答2:


Modern UI guidelines sugest inline error messages for input. However, if you still want a MessageBox, you can have it in the MessageDialog.

 MessageDialog dlg = new MessageDialog("Message"); await dlg.ShowAsync();



回答3:


In case you have to bypass MessageDialog's limitation on the number of possible commands (three), this MessageBox implementation might be helpful.



来源:https://stackoverflow.com/questions/13903494/do-windows-8-store-apps-have-a-messagebox-equivalent

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