Images downloaded in a async method shown after coming back from a detail page, so actually updating the UI after a background task

别等时光非礼了梦想. 提交于 2019-12-13 03:02:33

问题


I have a ListView with some stuff in and that List has some images that I load in a background task. But when I login and see the LIstview the images are not shown if I go to a detail page from one of my ListViewItems and come back the images are shown.

This is my "async" task:

 private async void DownloadImage(ImageObject imageObject)
    {
        ImageByte = await _IDataService.GetImage(imageObject.Id);

        ImageObjectImageSource = await LoadImageAsync(ImageByte);

        imageObject.ImageObjectSource = ImageObjectImageSource;
    }

来源:https://stackoverflow.com/questions/34244838/images-downloaded-in-a-async-method-shown-after-coming-back-from-a-detail-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!