EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

BitmapCreateOptions Enumeration

May 11, 2014

Specifies initialization options for a bitmap image.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  System.Windows.Media.Imaging
Assembly:  System.Windows (in System.Windows.dll)

'Déclaration
<FlagsAttribute> _
Public Enumeration BitmapCreateOptions

Member nameDescription
NoneNo initialization options are specified. This is the NOT the default value for the BitmapImage.CreateOptions property in Windows Phone (DelayCreation is the default).
DelayCreationCauses a BitmapSource object to delay initialization until it is necessary. This is useful when dealing with collections of images. This is the default value of the BitmapImage.CreateOptions property in Windows Phone.
IgnoreImageCacheInitializes images without using an existing image cache. Any existing entries in the image cache are replaced, even if they share the same URI. This option should only be selected when images in a cache need to be refreshed.
BackgroundCreationCauses a BitmapSource to be initialized as soon as it is declared. This option uses the image cache for previously used URIs. If an image is not in the image cache, the image will be downloaded and decoded on a separate background thread.

When IgnoreImageCache is specified, any existing entries in the image cache are replaced, even if they share the same URI.

Version Notes

Windows Phone

The BackgroundCreation value is valid for Windows Phone. For an application that targets Windows Phone, if you specify both BackgroundCreation and DelayCreation, the initialization of BitmapSource will be delayed until it is necessary. The initialization will use the image cache for previously used URIs. If an image is not in the image cache, the image will be downloaded and decoded on a separate background thread.

To preserve the aspect ratio of the image, we recommend that you typically use only one of the two pixel decoding settings (DecodePixelWidth or DecodePixelHeight).

If you specify BackgroundCreation in the CreateOptions of a BitmapImage, you have to specify only DecodePixelHeight. The DecodePixelWidth property is ignored when you specify BackgroundCreation.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Afficher:
© 2014 Microsoft