protected override IMessageBoxOption CreateMessageBoxOption(string message, string title, MessageIconType iconType) { var p = new MessageBoxOption(iconType) { Title = title, Message = message, View = Container.GetInstance <IShellMessageBoxView>() as FrameworkElement }; p.View.DataContext = p; switch (iconType) { case MessageIconType.Info: case MessageIconType.Alert: p.Buttons = DialogButtons.Ok; break; case MessageIconType.Confirm: p.Buttons = DialogButtons.YesNo; break; //case MessageIconType.Custom: default: throw new ArgumentOutOfRangeException(nameof(iconType), iconType, null); } return(p); }
public MessageBoxOption(MessageIconType iconType = MessageIconType.Info) { MessageIconType = iconType; }
protected abstract IMessageBoxOption CreateMessageBoxOption(string message, string title, MessageIconType iconType);