All docs
V18.2
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
18.1
17.2

Overview - Image

Image is an editor for displaying images.

Implementation Details

Image is realized by the ImageEditExtension class. Its instance can be accessed via the ExtensionsFactory.Image helper method, which is used to add an Image extension to a view. This method's parameter provides access to the Image's settings implemented by the ImageEditSettings class, allowing you to fully customize the extension.

The Image's client counterpart is represented by the ASPxClientImage object.

Declaration

Image can be added to a view in the following manner.

View code (ASPX):

Image:<br/><br/>

<% 
    Html.DevExpress().Image(
        settings => {
            settings.Name = "image1";

            settings.ImageUrl = "Content/Images/olive.jpg";
        }
    )
    .Render();
%> 

View code (Razor):

Image:<br/><br/>

@Html.DevExpress().Image(
    settings => {
        settings.Name = "image1";

        settings.ImageUrl = "Content/Images/olive.jpg";
    }
).GetHtml()
NOTE

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

The code result is demonstrated in the image below.

image-declaration.png

See Also