locked
How to apply background image to a page before it is shown ?

    Question

  • I am having a big problem when applying background image to my page ,because when navigating to that page the background imge flickers .

    how do i fox this problem ? Please i really need a solution for this .

    Thanks.


    19karabo91

    Friday, May 16, 2014 7:57 AM

Answers

  • Try setting it in App.Resources so it is loaded before the page loads.
    Friday, May 16, 2014 4:31 PM
    Owner

All replies

  • How are you applying the image now?

    You should be able to set the Background property of the Page in Xaml. There could be a delay if it takes time to load the image, so preload it into a resource and set the Background to the resource rather than hard coding it.

    You want to use a resource anyway so you can fall back to a solid colour in high contrast modes.

    Friday, May 16, 2014 1:06 PM
    Owner
  • i created an image brush in <Page.Resources> and set my grid background to that image brush

    19karabo91

    Friday, May 16, 2014 1:14 PM
  • Try setting it in App.Resources so it is loaded before the page loads.
    Friday, May 16, 2014 4:31 PM
    Owner