mercredi 12 mars 2014

The Metro Messagebox

we have 2 two ways to create message box in windows store


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