A newer version of this page is available. Switch to the current version.

Overview - ImageZoom

ImageZoom is an extension that provides you with the capability to display images in high-res detail. ImageZoom combines two image zoom effects. Hovering over the image displays a zoomed area, a clicking on the image enlarges it to a full-screen popup.

To see the ImageZoom in action, refer to its online demos.

Implementation Details

The ImageZoom is implemented by the ImageZoomExtension class. To access its instance, use the ExtensionsFactory.ImageZoom helper method, which is used to add an ImageZoom extension to a view. This method's parameter provides access to ImageZoom settings implemented by the ImageZoomSettings class.

Declaration

The code sample below demonstrates how to add an ImageZoom to a project.

View code:

@Html.DevExpress().ImageZoom( settings => {
    settings.Name = "imageZoom";
    settings.ImageUrl = Url.Content("~/Content/ImageZoom/my_image.jpg");
    settings.LargeImageUrl = Url.Content("~/Content/ImageZoom/my_image_large.jpg");
}).GetHtml()
NOTE

The Partial View should contain only the extension's code.

The code result is demonstrated by the image below.

ImageZoom-overview.png

See Also