Back to Devexpress

ASPxImageZoom Class

aspnet-devexpress-dot-web-88a1cdea.md

latest6.8 KB
Original Source

ASPxImageZoom Class

An image zoom control.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class ASPxImageZoom :
    ASPxWebControl,
    ISupportsImageCaching
vb
Public Class ASPxImageZoom
    Inherits ASPxWebControl
    Implements ISupportsImageCaching

Remarks

Create an ImageZoom Control

Design Time

The ASPxImageZoom control is available on the DX.25.2: Navigation & Layout toolbox tab in the Microsoft Visual Studio IDE.

Drag the control onto a form and customize the control’s settings, or paste the control’s markup in the page’s source code.

aspx
<dx:ASPxImageZoom ID="imageZoom" runat="server" Width="350px" Height="350px"  
                  ImageUrl="~/Content/Images/ZoomImages/overview.jpg" ClientInstanceName="ClientImageZoom">
</dx:ASPxImageZoom>

Run Time

csharp
using DevExpress.Web;
...
protected void Page_Load(object sender, EventArgs e)
{
    ASPxImageZoom imageZoom = new ASPxImageZoom();
    imageZoom.ID = "imageZoom";
    Page.Form.Controls.Add(imageZoom);

    imageZoom.ClientInstanceName = "ClientImageZoom";
    imageZoom.ImageUrl = "~/Content/Images/ZoomImages/overview.jpg";
    imageZoom.Width = 350;
    imageZoom.Height = 350;
}
vb
Imports DevExpress.Web

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
    Dim imageZoom As ASPxImageZoom = New ASPxImageZoom()
    imageZoom.ID = "imageZoom"
    Page.Form.Controls.Add(imageZoom)

    imageZoom.ClientInstanceName = "ClientImageZoom"
    imageZoom.ImageUrl = "~/Content/Images/ZoomImages/overview.jpg"
    imageZoom.Width = 350
    imageZoom.Height = 350
End Sub

Note

DevExpress controls require that you register special modules, handlers, and options in the Web.config file. You can change this file or switch to the Design tab in the Microsoft Visual Studio IDE to automatically update the Web.config file. Note that this information is automatically registered if you use the DevExpress Template Gallery to create a project.

The ASPxImageZoom class provides you with the ability to display images in high-res detail. The ASPxImageZoom control combines two image zoom effects. Hovering over the image displays a zoomed area (controlled by the ASPxImageZoom.EnableZoomMode property), a click on the image enlarges it in a full-screen popup (controlled by the ASPxImageZoom.EnableExpandMode property).

To specify an image displayed in preview area, use the ASPxImageZoom.ImageUrl property. The image displayed in the zoom window and the expand window is specified by the ASPxImageZoom.LargeImageUrl property.

You can supplement the image zoom with the image navigation functionality. For this purpose, link an ASPxImageZoom object to an ASPxImageZoomNavigator object using the ASPxImageZoom.AssociatedImageZoomNavigatorID property.

Note

ASPxImageZoom control provides you with a comprehensive client-side functionality implemented using JavaScript code.

The control’s client-side API is enabled if the ASPxImageZoom.ClientInstanceName property is defined or any client event is handled.

Implements

Show 14 items

IComponent

IDisposable

IParserAccessor

IDataBindingsAccessor

IControlBuilderAccessor

IControlDesignerAccessor

IExpressionsAccessor

IAttributeAccessor

IUrlResolutionService

INamingContainer

IPostBackDataHandler

IPostBackEventHandler

ICallbackEventHandler

IPropertiesOwner

Inheritance

Object Control WebControl ASPxWebControlBase ASPxWebControl ASPxImageZoom MVCxImageZoom

See Also

ASPxImageZoom Members

ASPxImageZoomNavigator

Image Zoom

DevExpress.Web Namespace