BinaryImageFor is an editor capable of displaying images from a binary stream.

Implementation Details

BinaryImageFor is realized by the BinaryImageEditExtension class. Its instance can be accessed via the ExtensionsFactory<ModelType>.BinaryImageFor<ValueType> strongly typed helper method, which is used to add a BinaryImageFor extension to a view. This first method's parameter is an expression that identifies model property to display. The second method's parameter provides access to the BinaryImageFor's settings implemented by the BinaryImageEditSettings class, allowing you to fully customize the extension.

The BinaryImageFor's client counterpart is represented by the ASPxClientBinaryImage object.


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

@Html.DevExpress().BinaryImageFor(model => model.Photo, 
    settings => {
        settings.ToolTip = "User photo"; 

The code result is demonstrated in the image below.


See Also