Please tell me, I'm developing a WPF application for FrameWork 4.0, because Win XP compatibility is required. Under certain conditions, I need to call a modal window, but with all the richness of the description of this procedure - I fail ... I get an exception: Exception thrown: 'System.InvalidOperationException' in PresentationCore.dll on this line: Window_Dialog winDialog = new Window_Dialog();
The error seems to be not new, there is a solution to it, a challenge in the second thread, but most likely a poor experience is having an effect, because it does not work out a solution.
void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { timer.Stop(); Order result = orders.Find(x => x.Id == TempOrder.Id); if(result.CustomerName == "") { Window_Dialog winDialog = new Window_Dialog(); if (winDialog.ShowDialog() == true) { MessageBox.Show("Записано!"); } else { MessageBox.Show("Отмена"); } } } I will be glad to your advice! Thank!
Exception thrown: 'System.InvalidOperationException' in PresentationCore.dllThe window simply does not open. In Output, only this line - Andrey