I currently have a loop something like this:
foreach(var item in theList)
{
//create writeablebitmap from item.GetPicture() which returns a stream.
//do stuff with it
//save it to isolated storage
}
This is a very long-running process because there are tons of images. I tried putting it in a background worker but you cannot create WriteableBitmaps there (they have to be on the UI thread). The problem is that the interface is totally unresponsive.
How can I make it process keypresses/the UI once every loop, just to make sure it can respond to the user doing things?
1 Answer