locked
How to eliminate the screen flash when displaying a page with a large background image.

    Question

  • I have a Canvas which takes up the whole screen and has a large high resolution background set from an image.  The image is loaded  by calling:

    bitmapImage = ref new BitmapImage(uri);

    where uri is the path to the jpeg bitmap file.  I then create an ImageBrush as follows:

    imageBrush = ref new ImageBrush();
    imageBrush->imageSource = bitmapImage;

    I then set this brush as the background for a Canvas:

    canvas->Background = brush;

    Finally I add this canvas to a canvas which is currently visible:

    visibleCanvas->Childeren->Append(canvas);

    This all works fine, except that the screen first flashes black and then the background image of the newly displayed canvas is shown.  I am assuming this is because it takes time to load the image and while it is loading you see through to the parent Canvas (which is black).  This flash is very distracting and I would like to get rid of it.  Is there a way to force the image to load before I attempt to display the Canvas?

    Thanks.

    Wednesday, December 26, 2012 10:33 PM

All replies

  • HI,

    I tested this on my side, but cannot reproduce this issue. I think it may has relationship with Image.

    Would you please upload a reproduced sample codes about this issue.

    You can upload to SkyDrive
    http://skydrive.live.com/

    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 01, 2013 6:16 AM
  • Thanks for the response.  I will try and put together a simple example, but I believe it has to do with using a high resolution graphic (in my case the graphic is 2048x1536).  I do not believe that I am the only one seeing this.  Before I posted here, I found the following link which seems to be very similar to what I am seeing.

    http://stackoverflow.com/questions/13964167/winrt-app-with-high-resolution-background-images

    Thanks.

    Wednesday, January 02, 2013 3:17 AM