locked
how to load images with a background wroker RRS feed

  • Question

  • Hello

    I need to load a relative large number of images on image controls.

    To improve the user experience i would like to implement a background worker to load the images and show them during the process of loading
    instead of showing them at the end of the process so the user can have a filing that all is working.

    How can I achieve this if a backgroundworker can not deal with image controls and can not pass bitmapimages?
    Tuesday, January 19, 2010 10:28 PM

Answers

  • just discovered that the bitmapimage can be frozen and passed back
    • Marked as answer by marck68 Thursday, January 21, 2010 8:11 AM
    Thursday, January 21, 2010 8:11 AM

All replies

  • You can use streams. Read the file into a stream, and you can pass the stream. Many classes (Including BitmapImage, in the property StreamSource) will take a stream, including those in WPF.
    Tuesday, January 19, 2010 10:31 PM
  • just discovered that the bitmapimage can be frozen and passed back
    • Marked as answer by marck68 Thursday, January 21, 2010 8:11 AM
    Thursday, January 21, 2010 8:11 AM