Use `Dispatcher.BeginInvoke()` to avoid crashing when displaying a message from another thread.