How to use MessageDialog Commands in a Windows Store app
Buttons are very important part of a message dialog if your application expect an input from a user. OK, Cancel, Yes, and No buttons are typical message dialog buttons. The MessageDialog class has a command bar that can support up to three commands. The Commands property is used to add and read commands.
The following code snippet adds two commands to the command bar of a MessageDialog.
// Add commands and set their callbacks. You can create a single callback
// Or create a separate callback for different commands
"OK", new UICommandInvokedHandler(this.CommandInvokedHandler)));
"Close", new UICommandInvokedHandler(this.CommandInvokedHandler)));
Here is complete sample code >>