-api-id | -api-type |
---|---|
P:Microsoft.UI.Xaml.Media.Imaging.BitmapImage.CreateOptions |
winrt property |
Gets or sets the BitmapCreateOptions for a BitmapImage.
<BitmapImage CreateOptions="bitmapCreateOptionsMemberName"/>
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.
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.