I have a page with several images all sourced from URIs.
While each image is in a Image.IsLoading == true
state, I'd like to show an ActivityIndicator in its place until the loading is done, but the logic is eluding me.
I'm thinking and trying things like this:
async void LoadImage()
{
while (Img1.IsLoading) ;//Do Nothing
//Then when image has loaded, switch ActivityIndicator off
activityIndicator.IsRunning = false;
activityIndicator.IsVisible = false;
}
but it never seems to give the result I want.
The idea of Task/async/await is all quite new to me so perhaps I'm getting it wrong.
Any advice much appreciated, thanks