Exemple #1
0
        public static MessageResult Show(System.Windows.Window owner, string messageBoxText, string caption, MessageButton button, MessageStyle style, MessageOptions options)
        {
            var vm = new MessageViewModel();

            var view = new Views.MessageBoxView();

            view.DataContext = vm;

            vm.Caption        = caption;
            vm.MessageBoxText = messageBoxText;
            vm.MessageStyle   = style;
            vm.MessageButton  = button;
            vm.MessageOptions = options;
            vm.ApplyMessageStyle();

            view.ShowDialog();

            return(vm.MessageResult);
        }