I wan’t to know the best method to load image asynchronously from Mysql in a WPF application.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the
ThreadPoolto load the image from the database.On the
ThreadPool, queue the load of the image from the database;When the image is loaded, still in the thread pool, convert the image into an
ImageSourceusingBitmapFrame.Create();Using
Dispather.Invoke, set theImageproperty to the loaded image.So, something like this: