Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
675
ShowPrintDialog crashes when called from background thread even though thread is STA
posted

Here is the error.

The calling thread cannot access this object because a different thread owns it.

here is an example project.

The LogIn window starts a new thread to load all the data and main gui and also hands updates to a splash screen. Everything on this thread appears to work fine including the XamDataGrid.

I don't understand why it gives the error since the Report was created on the thread that is trying to access it and there are other UI elements in use on the same thread and they work just fine.

To reproduce the problem, simply run the project and click the print button.

TestXamDataGrid.zip
Parents Reply Children
No Data