GridView Refresh Item Image URI is the Same but the Image has changed RRS feed

  • Question

  • Hi Everyone

    I would appreciate some help with this problem.

    have a gridview that is bound to a datasource of custom items. When the user changes some of the properties of the custom item it dynamically updates an image associated to the item. I save the image to the local storage with the filename based on the id of the item it is related to.

    The problem is that because the URI of the image does not change when the image changes the Gridview does not reload the image. I raise a NotifyPropertyChange("IconUri") when the image changes but the gridview does not refresh the image. I think it is because the gridview checks for a change in value.

    I have done a test. If I change the image name each time it works fine. But I don't want to do this because I don't want to store the image name. I let the user sync their item data to sky drive. When they open the list from another computer it regenerates the images to the local store. I don't want to be syncing the images or file names to sky drive. This would be too messy and require too much bandwidth.

    Any idea how I can force the GridItem to refresh the image if the URI has not changed? It is getting my property changed notification but not acting on it. The editing of the item happens on another page for editing. When the user returns to the Gridview page I want the change to reflect. The image is dynamically generated on the editing page after the user changes the properties that impact the image. I also tried changing the image URI temporarily while the image is being generated but I think the Grid ignores this because it is not being displayed when this happens.

    Any suggestion would be greatly appreciated!

    Tuesday, October 15, 2013 8:46 PM

All replies

  • post code; use datacontext ;use observallcollection; pass string as source to image on change
    Wednesday, October 16, 2013 7:34 AM