Microsoft Silverlight - SPLessons

Microsoft Silverlight Dispalying Image

Home > Lesson > Chapter 11
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Microsoft Silverlight Dispalying Image

Microsoft Silverlight Dispalying Image

shape Description

In silverlight, we can likewise show pictures by utilizing Image control. Move and customize the picture control onto the structure or compose the accompanying code in the code segment which dwell beneath the configuration structure. [html] <Grid x:Name="Layout" Width="250" Height="250" Background="yellow" > <Image x:Name="Logo" Source="/images/welcome.jpg" Stretch="Uniform" ></Image> </Grid> [/html]

Properties

shape Description

The following table shows you the properties of the Image control.
Properties Description
Stretch None :Sets the size of the image to default Fill  :Used to fill the container with the image Uniform :The default value UniformToFill : Used to resize the image and fill the container
Width Utilised to determine the width of the image
Height Utilised to determine the height of the image
Clip Utilised to hide and show certain portion of the image

shape Examples

The following example demonstrate about the Clip property of the image. [html] <Grid x:Name="Layout" Width="100" Height="150" Background="pink" > <Image x:Name="Welcome" Source=" Images/welcome.png" Stretch="Uniform"> <Image.Clip> <EllipseGeometry x:Name="Ellipse" RadiusX="100" RadiusY="100" Center="100,110"/> </Image.Clip> </Image> </Grid> [/html] Running the Application will generate the required output.

Summary

shape Points

  • Microsoft silverlight displaying images - Customize and drag the images by composing the code segments.