/// <summary> /// Called when [user interface loaded]. /// </summary> /// <param name="payload">The payload.</param> /// <returns></returns> private async Task OnUserInterfaceLoaded(object payload) { try { IsUserInterfaceEnabled = false; MessageHub.Publish(MessageNames.StatusAvailable, "Loading Pictures . . ."); var pictures = await StoreProvider.RetrievePictureHeadersAsync(); foreach (var p in pictures) { PictureHeaders.Add(p); } MessageHub.Publish(MessageNames.StatusAvailable, "Ready"); } catch (Exception ex) { // We send a status message to the hub but it should really be an Error message of its own type MessageHub.Publish(MessageNames.StatusAvailable, $"Error: {ex.Message}"); } finally { IsUserInterfaceEnabled = true; } }