I have an object that has a timer and it throws an event when the timer reaches to 5 minutes. In this event, I call a MessageBox.Show("Something") in my MainWindow.xaml.cs.
The problem is that when I call the MessageBox.Show(), the timer stops, until the user hits ok. And I need the timer to keep going even if the user hasn't clicked ok. Is where a good, elegant way to do this? This is what I've tried so far (but didn't work):
private void OnAlert(object sender, MvpEventArgs e)
{
this.Dispatcher.Invoke(
System.Windows.Threading.DispatcherPriority.Normal,
new Action(
delegate()
{
MessageBox.Show("Alert");
}
));
}