Inheritance: Caliburn.Micro.Screen, IMetroMessageBox
        public static MessageBoxResult ShowMetroMessageBox(this IWindowManager @this, string message, string title,
                                                           MessageBoxButton buttons)
        {
            MessageBoxResult retval;
            var shellViewModel = IoC.Get<IShell>();

            try {
                shellViewModel.ShowOverlay();
                var model = new MetroMessageBoxViewModel(message, title, buttons);
                @this.ShowDialog(model);

                retval = model.Result;
            }
            finally {
                shellViewModel.HideOverlay();
            }

            return retval;
        }
Beispiel #2
0
        public static MessageBoxResult ShowMetroMessageBox(this IWindowManager @this, string message, string title,
                                                           MessageBoxButton buttons)
        {
            MessageBoxResult retval;
            var shellViewModel = IoC.Get <IShell>();

            try {
                shellViewModel.ShowOverlay();
                var model = new MetroMessageBoxViewModel(message, title, buttons);
                @this.ShowDialog(model);

                retval = model.Result;
            }
            finally {
                shellViewModel.HideOverlay();
            }

            return(retval);
        }