Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Slow image source binding

$
0
0

I have an image that is displayed on every page that is source bound, and whenever I go to a new page it takes half a second to a second to load that image. Is there some way I can make sure this image is rendered before the page is shown to the user?

A little background:
The image is loaded using PCLStorage when the app starts up, and stored in the App.xaml.cs so that it can be accessed from the base view model that my view models inherit from. This allows the source binding to work on every page, but it also means that the image is always loaded when the binding executes, which I assume is after the rest of the page has been loaded.

I can't just define the image source in the XAML because the image could filename could vary, and the image is saved programatically. Unless there's some method to set image source in XAML using the PCLStorage absolute file path (assuming that would be quicker at loading than my current method)

Thanks in advance


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>