I'm really desperate. I have WPF MVVM app and I send and recieve some packets through USB. I use a library for that and this library needs HwndSource. Everything works fine, but now I need to send many packets and it takes some time so I decided that I use BackgroundWorker and show ProgressBar, but I don't know how to use HwndSource in BackgroundWorker, because I got this error:
The calling thread must be STA, because many UI components require this.
Can anyone help me with this issue?
Thank you.