Silverlight MultiScaleImage Control


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 C#. 


Similar Articles
Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.