In my method "sendconfig_dowork(object sender, DoWorkEventArgs e)" I like to show to user also the window when is finished.
When method is "not external" i defined so and working fine:
var window = System.Windows.Application.Current.Windows.OfType<MetroWindow>().FirstOrDefault();
if (window != null)
await window.ShowMessageAsync(@"Operation successed", @"Operation successed");
But this is not working in "External" Method like Background worker. I'm having trouble figuring out how I supposed to define that will work insider background worker? Or how is the best way to define that?
Program is written in C# WPF and MVVM politic. Thanks! If any question please ask.