public void ShowMsg(string title, string subTitle = "", string iconPath = "") { Application.Current.Dispatcher.Invoke(() => { var m = new Msg { Owner = Application.Current.MainWindow }; m.Show(title, subTitle, iconPath); }); }
public void ShowMsg(string title, string subTitle, string iconPath) { Dispatcher.Invoke(new Action(() => { var m = new Msg { Owner = GetWindow(this) }; m.Show(title, subTitle, iconPath); })); }