Exemple #1
0
        private void DisplayDialogBoxMessage(MetroDialogBoxMessage metroDialogBoxMessage)
        {
            var modal = metroDialogBoxMessage.ModalViewModel;

            modal.ModalClosed += ModalViewModelOnModalClosed;
            modal.FireLoad();
            if (PopUp != null || PopUpGrid != null)
            {
                _window.Dispatcher.Invoke(new Action(() =>
                {
                    PopUp.DataContext = metroDialogBoxMessage.ModalViewModel;
                    PopUpGrid.Visibility = Visibility.Visible;
                    VisualStateManager.GoToState(PopUp, "Open", true);

                }));
            }
        }
Exemple #2
0
 private void HandleDialogBoxMessage(MetroDialogBoxMessage metroDialogBoxMessage)
 {
     lock (_modelDialogBoxLock)
     {
         if (_modalDialogQueue.Count == 0)
         {
             DisplayDialogBoxMessage(metroDialogBoxMessage);
         }
         else
         {
             _modalDialogQueue.Enqueue(metroDialogBoxMessage);
         }
     }
 }
        private void HandleDialogBoxMessage(MetroDialogBoxMessage metroDialogBoxMessage)
        {
            /* if (metroDialogBoxMessage.Buttons != null)
            {
                foreach(var button in metroDialogBoxMessage.Buttons)
                {
                    if (button.IsCancel)
                    {
                        button.Command = CancelDialog;
                    }
                }

            }

            UpdateOnUI(() => DialogBoxInfo = metroDialogBoxMessage);

            UpdateOnUI(() => DialogBoxVisualState = "Showing");*/
        }