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 + "')";