public static void ShowErrorMessage(MainWindow mainWindow, Exception exception, string title = null)
        {
            var dlg = new XamlMessageBox()
            {
                Title = title ?? Properties.Resources.Error, Message = exception.Message, SubMessage = exception.StackTrace, Owner = mainWindow, MessageIcon = MessageBoxImage.Error
            };

            dlg.ShowDialog();
        }
        public static MessageBoxResult ShowMessage(Window owner, string text, string title, MessageBoxImage image)
        {
            var dlg = new XamlMessageBox()
            {
                Title = title, SubMessage = text, Owner = owner, MessageIcon = image
            };

            dlg.ShowDialog();

            return(dlg.Result);
        }