Tab
A newer version of this page is available. Switch to the current version.

FileManagerFileListThumbnailsViewSettings Class

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

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public class FileManagerFileListThumbnailsViewSettings :
    FileManagerSettingsBase
Public Class FileManagerFileListThumbnailsViewSettings
    Inherits FileManagerSettingsBase

Related API Members

The following members accept/return FileManagerFileListThumbnailsViewSettings objects:

Remarks

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

Example

WebForms:

<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