IStorageItemProperties IStorageItemProperties IStorageItemProperties IStorageItemProperties Interface

Provides access to common and content properties on items (like files and folders).

Syntax

Declaration

public interface IStorageItemPropertiespublic interface IStorageItemPropertiesPublic Interface IStorageItemProperties

Properties summary

Gets the user-friendly name of the item.

Gets the user-friendly type of the item.

Gets an identifier for the current item. This ID is unique for the query result or StorageFolder that contains the item and can be used to distinguish between items that have the same name.

Gets an object that provides access to the content-related properties of the item.

Methods summary

Retrieves an adjusted thumbnail image for the item, determined by the purpose of the thumbnail.

Retrieves an adjusted thumbnail image for the item, determined by the purpose of the thumbnail and the requested size.

Retrieves an adjusted thumbnail image for the item, determined by the purpose of the thumbnail, the requested size, and the specified options.

Properties

  • DisplayName
    DisplayName
    DisplayName
    DisplayName

    Gets the user-friendly name of the item.

    public string DisplayName { get; }public string DisplayName { get; }Public ReadOnly Property DisplayName As string

    Property Value

    • string
      string
      string
      string

      Gets the user-friendly name of the item.

  • DisplayType
    DisplayType
    DisplayType
    DisplayType

    Gets the user-friendly type of the item.

    public string DisplayType { get; }public string DisplayType { get; }Public ReadOnly Property DisplayType As string

    Property Value

    • string
      string
      string
      string

      The user-friendly type of the item.

    Remarks

    If the item is an image file, for example, it might have a user-friendly type of "JPG File".

  • FolderRelativeId
    FolderRelativeId
    FolderRelativeId
    FolderRelativeId

    Gets an identifier for the current item. This ID is unique for the query result or StorageFolder that contains the item and can be used to distinguish between items that have the same name.

    public string FolderRelativeId { get; }public string FolderRelativeId { get; }Public ReadOnly Property FolderRelativeId As string

    Property Value

    • string
      string
      string
      string

      The identifier for the item within the query result or StorageFolder.

    Remarks

    The current item could be a file, folder, or file group.

    You create a query result object when you create a query using one of the methods on a StorageFolder object. Depending on the method you call, your query result object could be a StorageFileQueryResult, a StorageFolderQueryResult, or a StorageItemQueryResult object.

  • Properties
    Properties
    Properties
    Properties

    Gets an object that provides access to the content-related properties of the item.

    public StorageItemContentProperties Properties { get; }public StorageItemContentProperties Properties { get; }Public ReadOnly Property Properties As StorageItemContentProperties

    Property Value

Methods

  • GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode)
    GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode)
    GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode)
    GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode)

    Retrieves an adjusted thumbnail image for the item, determined by the purpose of the thumbnail.

    public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode mode)public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode mode)Public Function GetThumbnailAsync(mode As Windows.Storage.FileProperties.ThumbnailMode) As IAsyncOperation( Of StorageItemThumbnail )

    Parameters

    Returns

    • When this method completes successfully, it returns a StorageItemThumbnail that represents the thumbnail image or null if there is no thumbnail image associated with the item.

    Remarks

    In Windows 8, the GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode,System.UInt32) method has just one immersive monitor at a time that can show the Windows Store app user interface. In Windows 8.1, the Windows Store app user interface can appear on multiple monitors, with the option to show a single app on multiple monitors simultaneously. For scaling, consider multiple scale factors at once.

    In Windows 8.1, the GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode,System.UInt32) method can return any size thumbnail. Therefore, apps that display local pictures should call this method to get the scaled image they want to display. This ensures that apps benefit from all cache and performance optimizations, including a special mechanism to obtain thumbnails from the cloud without downloading the full file.

  • GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode,System.UInt32)
    GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode,System.UInt32)
    GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode,System.UInt32)
    GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode,System.UInt32)

    Retrieves an adjusted thumbnail image for the item, determined by the purpose of the thumbnail and the requested size.

    public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode mode,System.UInt32 requestedSize)public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode mode,System.UInt32 requestedSize)Public Function GetThumbnailAsync(mode As Windows.Storage.FileProperties.ThumbnailMode,requestedSize As System.UInt32) As IAsyncOperation( Of StorageItemThumbnail )

    Parameters

    • mode

      The enum value that describes the purpose of the thumbnail and determines how the thumbnail image is adjusted.

    • requestedSize
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The requested size, in pixels, of the longest edge of the thumbnail. Windows uses the requestedSize as a guide and tries to scale the thumbnail image without reducing the quality of the image.

      If Windows can't find a thumbnail image that it can scale to meet the requested size, a larger thumbnail might be returned. If no larger thumbnail is available, a thumbnail image that is smaller than the requested size might be returned.

    Returns

    • When this method completes successfully, it returns a StorageItemThumbnail that represents the thumbnail image or null if there is no thumbnail image associated with the item.

  • GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode,System.UInt32,Windows.Storage.FileProperties.ThumbnailOptions)
    GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode,System.UInt32,Windows.Storage.FileProperties.ThumbnailOptions)
    GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode,System.UInt32,Windows.Storage.FileProperties.ThumbnailOptions)
    GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode,System.UInt32,Windows.Storage.FileProperties.ThumbnailOptions)

    Retrieves an adjusted thumbnail image for the item, determined by the purpose of the thumbnail, the requested size, and the specified options.

    public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode mode,System.UInt32 requestedSize,Windows.Storage.FileProperties.ThumbnailOptions options)public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode mode,System.UInt32 requestedSize,Windows.Storage.FileProperties.ThumbnailOptions options)Public Function GetThumbnailAsync(mode As Windows.Storage.FileProperties.ThumbnailMode,requestedSize As System.UInt32,options As Windows.Storage.FileProperties.ThumbnailOptions) As IAsyncOperation( Of StorageItemThumbnail )

    Parameters

    • mode

      The enum value that describes the purpose of the thumbnail and determines how the thumbnail image is adjusted.

    • requestedSize
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The requested size, in pixels, of the longest edge of the thumbnail. Windows uses the requestedSize as a guide and tries to scale the thumbnail image without reducing the quality of the image.

      If Windows can't find a thumbnail image that it can scale to meet the requested size, a larger thumbnail might be returned. If no larger thumbnail is available, a thumbnail image that is smaller than the requested size might be returned.

    • options

      The enum value that describes the desired behavior to use to retrieve the thumbnail image. The specified behavior might affect the size and/or quality of the image and how quickly the thumbnail image is retrieved.

    Returns

    • When this method completes successfully, it returns a StorageItemThumbnail that represents the thumbnail image or null if there is no thumbnail image associated with the item.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.GuidAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Storage.dll