Permalink
Cannot retrieve contributors at this time
Fetching contributors…
| <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| x:Class="ImageElementExample.ImageSimpleExample" | |
| Loaded="PageLoaded"> | |
| <StackPanel Name="myStackPanel"> | |
| <!-- <SnippetImageSimpleExampleInlineMarkup>--> | |
| <!-- Simple image rendering. However, rendering an image this way may not | |
| result in the best use of application memory. See markup below which | |
| creates the same end result but using less memory. --> | |
| <Image Width="200" | |
| Source="C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water Lilies.jpg"/> | |
| <Image Width="200"> | |
| <Image.Source> | |
| <!-- To save significant application memory, set the DecodePixelWidth or | |
| DecodePixelHeight of the BitmapImage value of the image source to the desired | |
| height and width of the rendered image. If you don't do this, the application will | |
| cache the image as though it were rendered as its normal size rather then just | |
| the size that is displayed. --> | |
| <!-- Note: In order to preserve aspect ratio, only set either DecodePixelWidth | |
| or DecodePixelHeight but not both. --> | |
| <BitmapImage DecodePixelWidth="200" | |
| UriSource="C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water Lilies.jpg" /> | |
| </Image.Source> | |
| </Image> | |
| <!-- </SnippetImageSimpleExampleInlineMarkup>--> | |
| </StackPanel> | |
| </Page> |