Skip to main content
Tab

FileManagerFileListThumbnailsViewSettings Class

Contains settings that relate to the file list‘s thumbnails view functionality.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public class FileManagerFileListThumbnailsViewSettings :
    FileManagerSettingsBase

The following members return FileManagerFileListThumbnailsViewSettings objects:

Remarks

Use the FileManagerSettingsFileList.ThumbnailsViewSettings property to access the FileManagerFileListThumbnailsViewSettings object.

Example

Web Forms:

<dx:ASPxFileManager ID="fileManager" runat="server">
    <SettingsFileList>
        <ThumbnailsViewSettings ThumbnailHeight="50" ThumbnailWidth="50">
            <ItemTemplate>
                <img class="tmplThumb" src='<%# Eval("ThumbnailUrl") %>' alt='<%# Eval("Name") %>' />
                <div class="tmplTextContainer">
                    <dx:ASPxLabel CssClass="mainInfo" runat="server" Text='<%# Eval("Name") %>' />
                    <br />
                    <dx:ASPxLabel CssClass="additionalInfo" runat="server" Text='<%# GetFileType(Container.DataItem as FileManagerFile) %>' />
                    <br />
                    <dx:ASPxLabel CssClass="additionalInfo" runat="server" Text='<%# GetSize(Container.DataItem as FileManagerFile) %>' />
                </div>
            </ItemTemplate>
        </ThumbnailsViewSettings>
    </SettingsFileList>
    ...
</dx:ASPxFileManager>

MVC:

settings.SettingsFileList.ThumbnailsViewSettings.ThumbnailHeight = Unit.Pixel(50);
settings.SettingsFileList.ThumbnailsViewSettings.ThumbnailWidth = Unit.Pixel(50);
settings.SettingsFileList.ThumbnailsViewSettings.SetThumbnailViewItemTemplateContent(c => {
    ViewContext.Writer.Write(
        "<img class=\"tmplThumb\" src=\"" + c.Item.ThumbnailUrl + "\" alt='<%# Eval(\"Name\") %>' />" +
        "<div class=\"tmplTextContainer\">" +
            "<span>" + DataBinder.Eval(c.DataItem, "Name") + "</span>" +
            "<br />" +
            "<span class=\"additionalInfo\">" + FileManagerItemInfo.Create("", c.Item.FullName).Type + "</span>" +
            "<br />" +
            "<span class=\"additionalInfo\">" + c.Item.Length / 1024 + "Kb </span>" +
        "</div>"
    );
});

Online Demo

See Also