locked
ListView item template background cached. RRS feed

  • Question

  • I have a Ui.ListView which popluates data from the server and renders each item in template. One of the bindings binds to background-image of CSS property. The image is taken from LocalStroage that is taken by the users camera. The UI.ListView and its datasource is recreated each time Page1 is loaded.

    Page1(listView)--> page2-->CameraUI

    Problem is. When I navigate back to page 1 from CameraUI the image isn't updated. Only if I restart the app it will be updated. Any suggestions?

    Template:

        <div class="itemtemplate" data-win-control="WinJS.Binding.Template">
                <div class="item" data-win-bind="style.backgroundImage: imagePreviewPath;">
    		    <div class="item-overlay">
                    <h4 class="item-title" data-win-bind="textContent: nameOfDevice"></h4>
                    </div>
            </div>
        </div>

    Loading the image path:

           
              item.imagePreviewPath = "url('ms-appdata:///local/" + imageFileName + "')";
             

     

    Thursday, April 18, 2013 1:06 AM

All replies

  • Can you upload your full test project to SkyDrive? That way it will be easier to understand your issue.

    Thanks,

    Prashant.


    @prashantphadke || Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, Windows Store & Phone Developer Solutions

    Friday, April 19, 2013 1:13 AM
    Moderator