* Reset branch for WPF changes * Convert BMP to PNG; fix link-out-of-scope err * Add snippets for WPF... 6794 files!!!! * Add missing snippets * update file updated between migration * Fix paths to include * update breadcrumb and toc * fix index links * fix index links * fix index links * fix markdown
1.6 KiB
title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
| title | ms.date | dev_langs | helpviewer_keywords | ms.assetid | |||||
|---|---|---|---|---|---|---|---|---|---|
| How to: Load an Image as a Thumbnail | 03/30/2017 |
|
|
02e055a0-54df-499a-b8b6-ab6ff7535cff |
How to: Load an Image as a Thumbnail
The following examples show how to load an xref:System.Windows.Controls.Image as a thumbnail to conserve application memory.
Example
The following example sets the xref:System.Windows.Media.Imaging.BitmapImage.DecodePixelWidth%2A property of a xref:System.Windows.Media.Imaging.BitmapImage in [!INCLUDETLA#tla_xaml] to reduce the memory required to load the image.
[!code-xamlImageElementExample_snip#ImageSimpleExampleInlineMarkup]
Example
The following example sets the xref:System.Windows.Media.Imaging.BitmapImage.DecodePixelWidth%2A property of a xref:System.Windows.Media.Imaging.BitmapImage in code to reduce the memory required to load the image.
[!code-csharpImageElementExample_snip#ImageSimpleExampleInlineCode1] [!code-vbImageElementExample_snip#ImageSimpleExampleInlineCode1]