Hi Markus,
create your own Messagebox like this:
And CodeBehind:
using System.Windows;
using System.Windows.Input;
using WpfApp01;
namespace WpfApp66
{
public partial class MyMessageBox : Window
{
public MyMessageBox()
{
InitializeComponent();
this.DataContext = this;
}
public static object ShowDialog(string msg) => (new MyMessageBox() { Message = msg }).ShowDialog();
public string Message { get; set; }
public ICommand Cmd { get => new RelayCommand((state) => { ExitMessageBox((state != null && state.ToString() == "True")); }); }
private void ExitMessageBox(bool result)
{
this.DialogResult = result;
this.Close();
}
}
}
And using:
MyMessageBox.ShowDialog("Display my Message");