Page 1 of 1

Should I call displayfromHTTP on C# UI thread?

Posted: Thu May 15, 2014 8:36 pm
by EDSmith
hi,
I am inheriting some c# winform application code + I find that displayFromHttp
(http://guides.gdpicture.com/content/GdP ... ring).html) is called on the UI thread in the application.
I find that if I delay the http request (using say fiddler) the application freezes untill the request is completed.
However if I do not call this update on the UI thread, I would end up updating the UI on a non-UI thread,
which is a C# no-no.
I assume the correct approach is to call displayFromHttp on a non UI thread and use the transferEnded event to
stimulate the update of the UI using ?

What is the best approach?
Is there sample code available for this?
Regards,
ED