ImageZoomNavigatorExtension.Bind(Object) Method
Binds the ImageZoomNavigator to a data source.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Parameters
Name | Type | Description |
---|---|---|
dataObject | Object | An object representing the bound data source. |
Returns
Type | Description |
---|---|
ImageZoomNavigatorExtension | A ImageZoomNavigatorExtension object representing the ImageZoomNavigator. |
Remarks
// Model
public static class BinaryImages {
public static IEnumerable GetData(int? categoryId = null) {
using(var context = new BinaryImagesContext()) {
if(categoryId != null)
return context.BinaryImages.Where(bi => bi.CategoryID == categoryId.Value).ToList();
return context.BinaryImages.ToList();
}
}
}
// Partial View
@Html.DevExpress().ImageZoomNavigator(settings => {
settings.Name = "zoomNavigator";
...
settings.ImageUrlField = "Images";
settings.LargeImageUrlField = "LargeImages";
settings.ThumbnailUrlField = "Thumbnails";
settings.ZoomWindowTextField = "ZoomText";
settings.ExpandWindowTextField = "ExpandText";
settings.Orientation = Orientation.Horizontal;
...
}).Bind(Model).GetHtml()
See Also