SIGN UP MEMBER LOGIN:    
ARTICLE

Silverlight MultiScaleImage Control

Posted by Mahesh Chand Articles | Silverlight with C# March 24, 2009
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 C#.
Reader Level:
Download Files:
 

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

Login to add your contents and source code to this article
share this article :
post comment
 

I think you have to describe MultiScaleImages in littel more this article dos't help beginners in well manner...!

Posted by kareem soomro Dec 10, 2011

It will be great if you can give the sample code to configure the source property of the MultiScaleImage control. If I follow the above mentioned code in my silverlight page, it crashes and application is closed.

Posted by anand tiwary Jul 20, 2010
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Gauge for SharePoint
Become a Sponsor