The code below speaks for itself on how to open multiple windows which have there own dispatcher.
private void CreateNewWindow()
{
Thread thread = new Thread(() =>
{
Window1 w = new Window1();
w.Show();
w.Closed += (sender2, e2) =>
w.Dispatcher.InvokeShutdown();
System.Windows.Threading.Dispatcher.Run();
});
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
}
Advertisement
May 19, 2011 at 1:15 pm
thanks…exactly what i was looking for.
May 19, 2011 at 4:38 pm
glad i could help.