public object ShowMessageBox(string caption, string message, MessageBoxIconType icon, MessageBoxHelpButton helpButton, params MessageBoxButton[] buttons)
        {
            object result = null;

            Execute.OnUIThread(() =>
            {
                var viewModel = new MessageBoxViewModel {
                    DisplayName = caption, Message = message, Icon = icon
                };
                if (buttons != null)
                {
                    foreach (var messageBoxButton in buttons)
                    {
                        viewModel.AddButton(messageBoxButton);
                    }
                }
                if (helpButton != null)
                {
                    viewModel.HelpButtonCallback = helpButton.Action;
                    viewModel.HelpButtonText     = helpButton.Text;
                }
                _windowManager.ShowDialog(viewModel);
                result = viewModel.DialogResult;
            });
            return(result);
        }
 public MessageBoxButtonViewModel(MessageBoxViewModel owner, MessageBoxButton button)
 {
     if (owner == null)
     {
         throw new ArgumentNullException("owner");
     }
     if (button == null)
     {
         throw new ArgumentNullException("button");
     }
     _owner  = owner;
     _button = button;
 }