Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

StorageItemThumbnail class

Applies to Windows and Windows Phone

Represents the thumbnail image associated with a system resource (like a file or folder).


Public NotInheritable Class StorageItemThumbnail
    Implements IRandomAccessStreamWithContentType, _
    IRandomAccessStream, _
    IDisposable, _
    IInputStream, _
    IOutputStream, _




The StorageItemThumbnail class has these types of members:


The StorageItemThumbnail class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

CloneStream Creates a new stream over the thumbnail that is represented by the current storageItemThumbnail object.
Close [C++, JavaScript]Releases system resources that are exposed by a Windows Runtime object.
Dispose [C#, VB]Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
FlushAsync Flushes data asynchronously in a sequential stream.
GetInputStreamAt Retrieves the thumbnail image data as an undecoded stream.
GetOutputStreamAt Retrieves an output stream object for writing thumbnail image data to a storage item.
ReadAsync Returns an asynchronous byte reader object.
Seek Sets the offset of the thumbnail stream to the specified value.
WriteAsync Writes data asynchronously in a sequential stream.



The StorageItemThumbnail class has these properties.

PropertyAccess typeDescription


Read-onlyGets a value that indicates whether the thumbnail stream can be read from.


Read-onlyGets a value that indicates whether the thumbnail stream can be written to.


Read-onlyGets the MIME content type of the thumbnail image.


Read-onlyGets the original (not scaled) height of the thumbnail image.


Read-onlyGets the original (not scaled) width of the thumbnail image.


Read-onlyGets the byte offset of the thumbnail stream.


Read-onlyGets a value that indicates whether the thumbnail image returned was a cached version with a smaller size.


Read/writeGets or sets the size of the thumbnail image.


Read-onlyGets a value that indicates if the thumbnail is an icon or an image.



You can get thumbnails for many file system resources through the Windows Runtime objects that represent them. Many of these objects have methods or properties that let you get (and sometimes set) a StorageItemThumbnail that represents the thumbnail associated with a particular resource.

To find out how to get thumbnail for a particular Windows Runtime object, see the documentation for that object. For example, to get a thumbnail for a file you can call one of the StorageFile.getThumbnailAsync methods, or to get a thumbnail for a contact you can use the Contact.thumbnail property.

For more code samples about retrieving thumbnails, see the Folder enumeration sample and the File thumbnails sample.


This example demonstrates how to get thumbnails for files.

No code example is currently available or this language may not be supported.

After GetThumbnailAsync completes, thumbnail gets a StorageItemThumbnail object.

In the example, the file variable gets a StorageFile that represents each file that we want to retrieve a thumbnail for. We used a query to obtain StorageFile objects for these files (stored in the file variable), but you can use whatever approach is best for your app to obtain StorageFile objects (like through the file picker).


Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8


Windows::Storage::FileProperties [C++]



See also




© 2015 Microsoft