Image


ImageHierarchy: DependencyObject Freezable Animatable Brush

 <Image     Source="filename"     Stretch="None|Uniform|UniformFill|Fill" /> 

<Image . . . /> provides a means for displaying an image in a document or application. Image supports bitmaps of the following types: BMP, GIF, JPG, ICO, PNG, and TIFF.

Attributes


Source (required)

The source URI for the image. It may be relative to the XAML application (e.g., /images/myimage.png), or it may be a remote image (e.g., http://www.example.com/myimage.png).


Stretch (optional)

Defines how the image should be stretched to fill the destination rectangle. If defined, this attribute must be one of the following:


Fill

Resizes the content to fit the destination. The aspect ratio is not preserved.


None

The original size is preserved; the image is not stretched.


Uniform

Resizes the original content to fit the destination and preserves the native aspect ratio.


UniformToFill

Resizes the original content to fit the destination and preserves the native aspect ratio. If the aspect ratio of the destination is different than the original image, the image will be clipped to fit into the destination.




XAML in a Nutshell
XAML in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596526733
EAN: 2147483647
Year: 2007
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net