private static void SetImageOfMessageBox(MessageBoxImage image)
        {
            switch (image)
            {
            case MessageBoxImage.Warning:
                _messageBox.SetImage("Warning.png");
                break;

            case MessageBoxImage.Question:
                _messageBox.SetImage("Question.png");
                break;

            case MessageBoxImage.Information:
                _messageBox.SetImage("Information.jpg");
                break;

            case MessageBoxImage.Error:
                _messageBox.SetImage("Error.jpg");
                break;

            default:
                _messageBox.img.Visibility = Visibility.Collapsed;
                break;
            }
        }
 public static MessageBoxResult Show
     (string caption, string text,
     MessageBoxButton button, MessageBoxImage image)
 {
     _messageBox = new WpfMessageBox
     {
         txtMsg = { Text = text }, MessageTitle = { Text = caption }
     };
     SetVisibilityOfButtons(button);
     SetImageOfMessageBox(image);
     _messageBox.ShowDialog();
     return(_result);
 }