Silverlight MultiScaleImage Control in VB.NET

The MultiScaleImage object represents an Image control that is used a multi-resolution image that is generated by the Deep Zoom Composer and can be zoomed and panned. This article demonstrates how to use a MultiScaleImage control in Silverlight using VB.NET.
  • 1701

Viewing MultiScaleImages

The MultiScaleImage object is used to view MultiScaleImages in XAML and Silverlight. The Source property of the MultiScaleImage is used to specify the location of the MultiScaleImage. This property can be an absolute URL or a relative URL. The following code snippet views a jpg file using the absolute path.

<MultiScaleImage Source="Tree.jpg" />


The following code snippet uses an absolute URL to view a file from a website.

<MultiScaleImage Source="http://www.c-sharpcorner.com/UploadFile/AuthorMultiScaleImage/mahesh.jpg" />

Stretching MultiScaleImages

The Stretch property of the MultiScaleImage class that is of type Stretch enumeration is used to stretch an MultiScaleImage. It has values None, Uniform, UniformToFill, and Fill. The Stretch enumeration is defined in Table 2. The Width and the Height property of the MultiScaleImage class represent the width and the height of an MultiScaleImage.

The Width and Height properties represent the width and height of the MultiScaleImage control.

The following code snippet views an MultiScaleImage and stretches to uniform with width and height of the MultiScaleImage to 200 and 200 respectively.

<MultiScaleImage Source="Dock.jpg" Stretch="Uniform"

       Width="200" Height="200"/>  

Summary

In this article, I discussed how we can create an MultiScaleImage control and view MultiScaleImages in Silverlight and VB.NET.

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.