Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to avoid the flickering effect when pushing a new page

$
0
0

Hi guys,

I noticed a few issues in my application. All of them are very subtle, but notable once we are aware of them...

Before describing these ones, it's important to say that I am using a MasterDetail page !
Firstly, when I push a new page using PushAsync method, there is a flickering effect. Indeed, here is how the UI is behaving:

  • there is some delay
  • the arrow icon is being displayed while still displaying the previous page
  • there is some delay
  • the page show up and the default background is notable (white in my case)
  • the components finally show up too

The delays that I am talking about are quite short (depending on the pages obviously). I mean, for example, a simple page would take around 1 to 2 seconde(s) to show up and even if the debug mode is for a lot, I am looking for some good practices to improve the performance and remove this effect mainly caused by the fact that the new page's background is remarkable.

It's also important to notify that I'm not using the XamlCompilation attribute while I'm debugging to gain some time during the compilation !

Secondly, on some pages I have an image as a background and this last one is always loading with some delay comparing to the rest of the components. Therefore, with the above issue it's like having a double flick... I tried to use CachedImage control instead of the Image's one, but the quality of the picture is well let's be honest quite gross when I am doing so.

Do you guys have any tips to improve my application ? Also I am curious about something: it's quite commun to use the InitializeComponents into a page's constructor, loading all of them at the same time, but is there a way to only load the important one in a first place and the rest afterward ?

I thank you all the people who will take the time to respond to my questions and I wish you a great weekend !! :)
Best regards,

MT WSM


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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