Udostępnij za pośrednictwem


BitmapImage.CreateOptions Property

Definition

Gets or sets the BitmapCreateOptions for a BitmapImage.

public:
 property BitmapCreateOptions CreateOptions { BitmapCreateOptions get(); void set(BitmapCreateOptions value); };
BitmapCreateOptions CreateOptions();

void CreateOptions(BitmapCreateOptions value);
public BitmapCreateOptions CreateOptions { get; set; }
var bitmapCreateOptions = bitmapImage.createOptions;
bitmapImage.createOptions = bitmapCreateOptions;
Public Property CreateOptions As BitmapCreateOptions
<BitmapImage CreateOptions="bitmapCreateOptionsMemberName"/>

Property Value

The BitmapCreateOptions used for this BitmapImage. The default is None. With this default, a BitmapImage uses cached content when it is available. For a BitmapImage that is created by referencing an image source file by Uniform Resource Identifier (URI), the Uniform Resource Identifier (URI) controls the internal caching scheme.

Remarks

The other possible value for CreateOptions is BitmapCreateOptions.IgnoreImageCache. You should only use BitmapCreateOptions.IgnoreImageCache in cases where you know that the source image file as retrieved by Uniform Resource Identifier (URI) has the potential to change over time. Otherwise, setting CreateOptions to use BitmapCreateOptions.IgnoreImageCache causes all newly retrieved image sources to be decoded again, which can negatively impact performance. BitmapCreateOptions.IgnoreImageCache is typically only used by design tools that directly manipulate an image in a file location and need to enforce that any URI-determined content is always reloaded from the location, not from the cache.

Applies to