Downloading images before display

Hi, i am try to make imageslides in my app (code below), it is working but, when i first time display images there is nothing for few sec.

Is it possible to load image on page no. 2 when i am od page no 1 ?
Or, download those images to app folder and then display them form local storage ?

<DockPanel Height="200" Alignment="Top" ux:Class="Sliderimage">
<PageIndicator Dock="Bottom" Alignment="Center" Margin="5" Navigation="slides">
<Circle ux:Template="Dot" Width="5" Height="5"  Margin="5">
<SolidColor ux:Name="dotStrokeBody" Color="#0000" />
<Stroke ux:Name="dotStroke" Width="1">
<SolidColor ux:Name="dotStrokeColor" Color="#bbb" />
</Stroke>
<ActivatingAnimation>
<Change dotStrokeBody.Color="#aaa" />
<Change dotStrokeColor.Color="#aaa" />
</ActivatingAnimation>
</Circle>
</PageIndicator>


<PageControl ux:Name="slides" ClipToBounds="false" Height="100%"
Alignment="Top">


<Page>
<BackgroundImage Url="http://kutethemes.net/wordpress/muse/wp-content/uploads/revslider/MUSE-opt4/slide-bg31.jpg" />
</Page>

<Page>
<BackgroundImage Url="http://kutethemes.net/wordpress/muse/wp-content/uploads/revslider/MUSE-opt4/slide-bg21.jpg" />
</Page>

<Page>
<BackgroundImage Url="http://kutethemes.net/wordpress/muse/wp-content/uploads/revslider/MUSE-opt4/slide-bg16.jpg"  />
</Page>

</PageControl>
</DockPanel>

Anybody ?

An Image element that is part of the UI tree should start loading immediately, prior to actually being visible (unless a different MemoryPolicy is used). If you are using a Navigator with ux:Template however, it means those images aren’t rooted in the UI tree yet, thus wait until that happens.

There’s no formal way to preload an image in the second case yet, but perhaps you could stick your images in an invisible StackPanel.

<StackPanel Alignment="TopLeft" Visibility="Hidden">
   <Image Url="..."/>

Since the size of the images is needed it should force their loading.

I’ll a feature request to make a better way to request preloading of images.

Thanks dude.

Yeah I need this too! Thanks!

I find solution for this problem. I use this : https://github.com/bolav/fuse-cachingimagesource

It is working, but it is working only on real device. On “simulator” it show some error (Probably because there is no space do save images) anyway … it is do the job for me.

Hi edA-qa mort-ora-y,
What’s new on the road map for this feature? I’d need too :slight_smile:

edA-qa mort-ora-y wrote:

An Image element that is part of the UI tree should start loading immediately, prior to actually being visible (unless a different MemoryPolicy is used). If you are using a Navigator with ux:Template however, it means those images aren’t rooted in the UI tree yet, thus wait until that happens.

There’s no formal way to preload an image in the second case yet, but perhaps you could stick your images in an invisible StackPanel.

<StackPanel Alignment="TopLeft" Visibility="Hidden">
   <Image Url="..."/>

Since the size of the images is needed it should force their loading.

I’ll a feature request to make a better way to request preloading of images.