locked
backgroundImage RRS feed

  • Question

  • Does anybody have any idea how to add the backgroundimage of the tile but from the LOCAL folder?

    this works: backgroundImage: '/images/metrobooks-icon.png', //<-- part of the App Package inside the "images" folder 

    this does not: backgroundImage: folder.path+"\\myimage.gif",  <-- I WANT THIS

    ---

    var folder = Windows.Storage.ApplicationData.current.localFolder;

    list.push({
                            group: sampleGroups[0], 
                            key: "ss",
                            title: myTitle,
                            subtitle: '',
                            backgroundColor: "rgb(231,98,33)",
                            backgroundImage: folder.path+"\\myimage.gif",
                            content: (new Array(16)).join(''),
                            description: ''
                        }); 

    Any ideas?

    Saturday, May 12, 2012 2:20 AM

Answers

  • This seems to work:

    backgroundImage: "ms-appdata:///local/myimage.gif",
    but beware of this caching problem.

    As far as I can tell, if you are dynamically changing these images, you need to always store them in this storage location with unique urls, making sure you are removing images that are no longer needed.

    • Proposed as answer by jrboddie Saturday, May 12, 2012 5:11 PM
    • Marked as answer by Dino He Friday, May 18, 2012 9:51 AM
    Saturday, May 12, 2012 4:03 PM

All replies

  • This seems to work:

    backgroundImage: "ms-appdata:///local/myimage.gif",
    but beware of this caching problem.

    As far as I can tell, if you are dynamically changing these images, you need to always store them in this storage location with unique urls, making sure you are removing images that are no longer needed.

    • Proposed as answer by jrboddie Saturday, May 12, 2012 5:11 PM
    • Marked as answer by Dino He Friday, May 18, 2012 9:51 AM
    Saturday, May 12, 2012 4:03 PM
  • What a shame! ¬¬

    lol

    Saturday, May 12, 2012 6:08 PM