This project is read-only.

Create another Modern Window in a new STA Thread

May 30, 2013 at 9:36 AM
I already have a main window(Modern window), I want to create another window in a new STA thread.But I get the error
"cannot access freezable Shell.WindowChrome across threads bec it cannot be frozenause"
I use Dispatcher to create the window, up error solved. but antother problem is
"The calling thread can not accress the object because another thread own it"

I want to know could I create another modern window in a new STA thread?
For traditional window It is OK.

Thank you very much
May 30, 2013 at 10:03 AM
My Code as follow:
private void Button_Click_1(object sender, RoutedEventArgs e)
        Thread thread = new Thread(new ThreadStart(
                ModernWindow theView = new ModernWindow();
                theView.Closed += (viewsender, viewe) => theView.Dispatcher.InvokeShutdown();
        thread.Name = "ChildThread";
        thread.IsBackground = true;
Jun 3, 2013 at 10:58 PM
Good question. I can reproduce, but I do not know why this fails. Creating a Window instead of ModernWindow works just fine.
Nov 11, 2014 at 7:27 PM
Do we have a fix for this issue yet? I am currently trying to do the same as Pagina, and getting the same error as well.