I have a background worker which I use to get some data from a web server. It's required to download some images (png or jpg) also. But every time I try to create BitmapImage or WriteableBitmap in the background worker thread I get Invalid cross-thread access Is it ever possible to load image in background not UI thread?
use this it will work for you.
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
//write here whatever you want to update on screen.
textblock.Text = "text changed";
// just like this line changed the text of a textblock
});
if it does not work paste your code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With