first:
MessageDialog msDialog=new MessageDialog("Do you want to delete this category?","delete");
//Cancel Button
UICommand cancelBtn = new UICommand("Cancel");
cancelBtn.Invoked = CancelBtnClick;
msDialog.Commands.Add(cancelBtn);
UICommand okBtn = new UICommand("ok");
cancelBtn.Invoked = okBtnClick;
msDialog.Commands.Add(okBtnClick);
msDialog.ShowAsync();
second :
MessageDialog msDialog=new MessageDialog("Do you want to delete this category?","delete");
var MyAction = new UICommandInvokedHandler(
(command) =>
{
//you code
});
msDialog.Commands.Add(new UICommand(
"Ok", MyAction));
//Show message
msDialog.ShowAsync();
Aucun commentaire:
Enregistrer un commentaire