locked
Maintaining and Accessing a History of Photos Accessed

    Question

  • I know this is going to seem "asked and answered" (like a million times, but I am really missing something about Windows 8 (or 8.1)) Modern Apps. It has to do with accessing pictures through XAML using bindable properties (like ImageSource) So rather than ask "How DO I..." let me ask "How SHOULD I..."

    I am working on an App that will enable the user to

    • Select an existing Picture from the PictureLibrary
    • Do something to it and save it back to the PictureLibrary (or a subfolder)
    • That's it!
    • When the user returns to the app I want to display a list of the images that they recently accessed

    In my app I ASSUME, that since I want to maintain a history of the images that a user has saved, I need to keep a list of file locations that the user has saved. I can do this and use the ApplicationData.Current.LocalFolder location for that data file. I do not want to maintain a duplicate of the files (this would unnecessarily bloat my data and it totally unnecessary).

    My ObservableCollection has a property (I have tried string and Uri) that I can bind to my list of images. But this NEVER works. 

    I have looked at tons of random solutions but none actually match what I am trying to do.

    Today I found this: StorageItemAccessList: http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.accesscache.storageitemaccesslist.aspx and realize that I am probably missing some built in feature.

    So, my question is this, am I crazy? What is the "right way" to store the history of files accessed and then create a bindable source for my image controls that actually works in Windows 8.1?


    Matthew McDermott, MVP SharePoint

    Wednesday, May 14, 2014 5:15 PM

Answers

  • Hi Matthew,

    Probably MostRecentlyUsedList is the one that can store the access history for you, up to 25 items. See more information from How to track recently used files and folders. You can save the list to your app local folder for next time use.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, May 15, 2014 7:17 AM
    Moderator