locked
Where to find StorageItemContentProperties.RetrievePropertiesAsync Property Names? RRS feed

  • Question

  • The method StorageItemContentProperties.RetrievePropertiesAsync expects an IEnumerable<string> collection that contains the names of the properties to retrieve.

    I was looking for a complete list of possibles property names. What I found is this: Windows Property System that can be set on Windows files

    It seems to me that this list is not complete, since it does not contain any properties for directories (folders). For example, I've tried the property name "Type" on a StorageFolder object and received "Local Disk" or "Network Drive". Passing "Used space" threw an exception.

    Is there a place where I can find all property names?

    Thanks

    Stefan

    Monday, August 26, 2013 4:17 PM

Answers

  • I think that if you pass in a empty list, the entire set of properties will be returned.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by rstg Tuesday, August 27, 2013 1:10 PM
    Monday, August 26, 2013 7:38 PM
    Moderator

All replies

  • I think that if you pass in a empty list, the entire set of properties will be returned.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by rstg Tuesday, August 27, 2013 1:10 PM
    Monday, August 26, 2013 7:38 PM
    Moderator
  • Matt,

    Thank you for your reply.

    From what I saw, the result is as you described it. With one exception: Having a StorageFolder object of the root directory of a drive, e.g. c:\, the properties "System.ItemType" and "System.ItemTypeText" are not contained in the returned dictionary.

    Calling StorageItemContentProperties.RetrievePropertiesAsync(new string[] { "Type" }) on such a storage item, the result contains one entry with the key "System.ItemTypeText" with the value "Local Disk" (or "Network Drive").

    Being able to use "Type" as a property name to retrieve was a little bit confusing to me. It made me think there are more properties than listed here.

    But, obviously, there are only the listed ones. I would have liked to add the ability to call StorageItemContentProperties.RetrievePropertiesAsync with an empty list to the docs, but unfortunately there is no possibility to add community additions. Maybe someone at Microsoft can add this to the remarks.

    Thanks again,

    Stefan

    Tuesday, August 27, 2013 1:10 PM