Good afternoon, such a problem, there is a timer, it performs the asynchronous method every second (asyc / await / Task) and in this method you need to create a window and show it, something like a notification, but catch System.InvalidOperationException: STA, because most UI components require it. '
private async void ShowMagic(object sender, EventArgs e) { await Task.Factory.StartNew(() => { if (ListofNearCalls != null) { NotificationWindow temp = new NotificationWindow(); temp.Show(); } }); }
new NotificationWindow().ShowDialog();- tym32167