Udostępnij za pośrednictwem


IStorageItemProperties.GetThumbnailAsync Method

Definition

Overloads

GetThumbnailAsync(ThumbnailMode)

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

GetThumbnailAsync(ThumbnailMode, UInt32)

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

GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions)

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

GetThumbnailAsync(ThumbnailMode)

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

public:
 IAsyncOperation<StorageItemThumbnail ^> ^ GetThumbnailAsync(ThumbnailMode mode);
/// [Windows.Foundation.Metadata.Overload("GetThumbnailAsyncOverloadDefaultSizeDefaultOptions")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode const& mode);
[Windows.Foundation.Metadata.Overload("GetThumbnailAsyncOverloadDefaultSizeDefaultOptions")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode);
function getThumbnailAsync(mode)
Public Function GetThumbnailAsync (mode As ThumbnailMode) As IAsyncOperation(Of StorageItemThumbnail)

Parameters

mode
ThumbnailMode

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

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.

Attributes

Remarks

In Windows 8, the GetThumbnailAsync method has just one immersive monitor at a time that can show the UWP app user interface. In Windows 8.1, the UWP 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 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.

See also

Applies to

GetThumbnailAsync(ThumbnailMode, UInt32)

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

public:
 IAsyncOperation<StorageItemThumbnail ^> ^ GetThumbnailAsync(ThumbnailMode mode, unsigned int requestedSize);
/// [Windows.Foundation.Metadata.Overload("GetThumbnailAsyncOverloadDefaultOptions")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode const& mode, uint32_t const& requestedSize);
[Windows.Foundation.Metadata.Overload("GetThumbnailAsyncOverloadDefaultOptions")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode, uint requestedSize);
function getThumbnailAsync(mode, requestedSize)
Public Function GetThumbnailAsync (mode As ThumbnailMode, requestedSize As UInteger) As IAsyncOperation(Of StorageItemThumbnail)

Parameters

mode
ThumbnailMode

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

requestedSize
UInt32

unsigned int

uint32_t

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.

Attributes

See also

Applies to

GetThumbnailAsync(ThumbnailMode, UInt32, 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(ThumbnailMode mode, unsigned int requestedSize, ThumbnailOptions options);
/// [Windows.Foundation.Metadata.Overload("GetThumbnailAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode const& mode, uint32_t const& requestedSize, ThumbnailOptions const& options);
[Windows.Foundation.Metadata.Overload("GetThumbnailAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode, uint requestedSize, ThumbnailOptions options);
function getThumbnailAsync(mode, requestedSize, options)
Public Function GetThumbnailAsync (mode As ThumbnailMode, requestedSize As UInteger, options As ThumbnailOptions) As IAsyncOperation(Of StorageItemThumbnail)

Parameters

mode
ThumbnailMode

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

requestedSize
UInt32

unsigned int

uint32_t

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
ThumbnailOptions

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.

Attributes

See also

Applies to