I would like to know if any of you know how to solve this damn error, (I want to open another window but it gives this error when it starts) = can help?
I do not use more than 1 window for applications, I just use the main window and populate it with usercontrols linked to ViewModels in the MVVM model, but usually when it comes to using different thread you have to use with Dispatcher.Invoke(...)
See my example to change the background color of a message popup (type Toast)
TempBackgroundColor.Dispatcher.Invoke(() => TempBackgroundColor = corfundo);
as mentioned by Anderson Henrique
no more information we can not help
A kick in the dark (and without testing anything) I would use something like this:
var w = new Window();
this.Dispatcher.Invoke(() => w.Show());
The this
in this case is its MainWindow
.