FileManagerThumbnailCreateEventArgs.File Property
Obsolete. Gets a file related to the event.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v20.2.dll
Declaration
[Obsolete("Use the Item property instead.")]
public FileManagerFile File { get; }
<Obsolete("Use the Item property instead.")>
Public ReadOnly Property File As FileManagerFile
Property Value
Type | Description |
---|---|
FileManagerFile | A FileManagerFile object that represents a file currently being processed. |
Available values:
Name | Description |
---|---|
Permissions | Provides a set of permissions for the File Manager's file. |
Extension | Gets the string that specifies the extension of the file. |
Folder | Gets the parent folder to which the current file belongs. |
Equals(FileManagerFile) | Compares this FileManagerFile instance with the specified object. |
FileManagerFile(FileSystemProviderBase, FileManagerFolder, String, String, FileManagerFileProperties) | Initializes a new instance of the FileManagerFile class with the specified settings when the specified file system provider is used. |
FileManagerFile(FileSystemProviderBase, FileManagerFolder, String, String) | Initializes a new instance of the FileManagerFile class with the specified settings. |
FileManagerFile(FileSystemProviderBase, FileManagerFolder, String, FileManagerFileProperties) | Initializes a new instance of the FileManagerFile class with the specified settings when the specified file system provider is used. |
FileManagerFile(FileSystemProviderBase, FileManagerFolder, String) | Initializes a new instance of the FileManagerFile class with the specified settings when the specified file system provider is used. |
FileManagerFile(FileSystemProviderBase, String, String[], FileManagerFileProperties) | Initializes a new instance of the FileManagerFile class with specified settings. |
FileManagerFile(FileSystemProviderBase, String, String[]) | Initializes a new instance of the FileManagerFile class with the specified settings. |
FileManagerFile(FileSystemProviderBase, String, String) | Initializes a new instance of the FileManagerFile class with the specified settings. |
FileManagerFile(FileSystemProviderBase, String) | Initializes a new instance of the FileManagerFile class with the specified relative name when the specified file system provider is used. |
Remarks
Within the ASPxFileManager.CustomThumbnail event's handler, the currently processed file can be accessed by using the File property.
Examples
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;
}
}