Skip to main content
A newer version of this page is available. .
Tab

FileManagerThumbnailCreateEventArgs.File Property

OBSOLETE

Use the Item property instead.

Gets a file related to the event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[Obsolete("Use the Item property instead.")]
public FileManagerFile File { get; }

Property Value

Type Description
FileManagerFile

A FileManagerFile object that represents a file currently being processed.

Remarks

Within the ASPxFileManager.CustomThumbnail event’s handler, the currently processed file can be accessed by using the File property.

Example

In the example below, the CustomThumbnail event is handled to analyze file extensions and represent each file type using the corresponding custom thumbnail image.

public void ASPxFileManager1_CustomThumbnail(object source, DevExpress.Web.FileManagerThumbnailCreateEventArgs e) {
        switch(((FileManagerFile)e.Item).Extension) {
            case ".avi":
                e.ThumbnailImage.Url = "Images/movie.png";
                break;
            case ".zip":
                e.ThumbnailImage.Url = "Images/archive.png";
                break;
            case ".txt":
                e.ThumbnailImage.Url = "Images/txt.png";
                break;
            case ".rtf":
                e.ThumbnailImage.Url = "Images/richtxt.png";
                break;
            case ".mp3":
                e.ThumbnailImage.Url = "Images/music.png";
                break;
            case ".xml":
                e.ThumbnailImage.Url = "Images/code.png";
                break;
        }
}
See Also