The Stretch possible values include Fill, None, Uniform which is the default value and UniformToFill. Fill will stretch the image in width and height to fit the Image element. None will keep the image native size. Uniform will set the largest possible size while keeping the aspect ratio unchanged. UniformToFill will size the width and the height proportionately until the image fills the available height and width.

<UserControl x:Class="SilverlightApplication15.MainPage"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">
            <Image Source="mypix.png" />

The following video clip shows the execution of this code sample and provides more information.

Leave a Reply

Your email address will not be published. Required fields are marked *