How to display a message box in windows 8 apps using c# like calling MessageBox.Show() in windows phone 7?
Make sure Windows has the latest update: Select check for updates now, and then select Check for updates. Or, select the Start button, then select Settings > Update & Security > Windows Update > Check for Updates. If there is an available update, select Install now.
Go to the Start button, and then from the apps list select Microsoft Store. Visit the Apps or Games tab in Microsoft Store. To see more of any category, select Show all at the end of the row. Select the app or game you'd like to download, and then select Get.
Viewing the location of programs and apps downloaded from the Microsoft Store. Programs and apps downloaded from the Microsoft Store are installed in the following path by default: C:/Program Files/WindowsApps (Hidden items). To check hidden items, open This PC, click View and select Hidden items.
MessageDialog msgDialog = new MessageDialog("Your message", "Your title"); //OK Button UICommand okBtn = new UICommand("OK"); okBtn.Invoked = OkBtnClick; msgDialog.Commands.Add(okBtn); //Cancel Button UICommand cancelBtn = new UICommand("Cancel"); cancelBtn.Invoked = CancelBtnClick; msgDialog.Commands.Add(cancelBtn); //Show message msgDialog.ShowAsync();
And your call backs
private void CancelBtnClick(IUICommand command) { } private void OkBtnClick(IUICommand command) { }
P.S. You can follow this tutorial for more.
The MessageDialog class should fit your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With