Silverlight Image Control In VB.NET

In this article we will learn about Image Control and its main properties in Silverlight using VB.NET.
  • 1985

Introduction: We use image control to show image in our application. It is essential control for displaying image in our application.

For example, We take a Silverlight application and then take one Image control. Then we go to Source property of Image and select a image for image control. Then, we go to Stretch property. This property defines how the image will be stretch. There are four values for this property.

  • None: If we set this value to Stretch property, then image will display in original size. But, only that part of image will be displayed which will be fit with image control size from top left of original image. The output will be as following image 

    Untitled-1.gif

  • Fill: If we set this value, the image control gets completely fills with the original image to which we  have added to image control by Source property. It generally fills the whole area of image control with source image.  

    Untitled-2.gif

  • Uniform: It fills the source image into image control without disturbing its aspect ratio. It does't fills whole area of image control with image, but it looks for it's best appearance.

    Untitled-3.gif

 

  • UniformToFill: It fills the image control with source image according to size of image control without disturbing aspect ratio of source image.

    Untitled-4.gif

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.