Table of Contents

Class FileListBox

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

VirtualListBox descendant which allows to browse folder contents.

public class FileListBox : VirtualListBox, IBaseObject, IDisposableObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, INotifyDataErrorInfo, IReadOnlyStrings
Inheritance
FileListBox
Implements

Constructors

FileListBox()

Initializes a new instance of the FileListBox class.

Fields

AddDrivesToRootFolder

Gets or sets whether to add all drives (c:, d:, etc.) to the list of the special folders.

AdditionalSpecialFolders

Gets or sets list of additional special folders. If specified, these folders will be added to the list of root level folders.

DefaultFileImage

Gets or sets default svg image used for the "file" items.

DefaultFolderImage

Gets or sets default svg image used for the "folder" items.

DriveItemTemplate

Gets or sets template for the drive item when it is added to the list of the special folders. Default is "{0}".

FolderInfo

Gets or sets global FileListBox.FolderInfoItem for the file or folder. FileListBox.FolderInfoItem allows to specify icon, custom title and some other information.

HiddenSpecialFolders

Gets or sets list of special folder which are hidden.

VisibleSpecialFolders

Gets or sets list of visible special folders. If specified, only these folders will be visible on the root level.

Properties

AddRootFolderItem

Gets or sets whether to add "/" item which allows to open root folder.

AddUpperFolderItem

Gets or sets whether to add ".." item which allows to open parent folder.

AllowGoToSubFolder

Gets or sets whether double click on folder opens its content in the control.

IsReloading

Gets whether control is reloading and selection change events should be ingored.

SearchPattern

Gets or sets search pattern which allows to limit files shown in the control. An example: ".uixml". Default value is "" (all files).

SelectedFolder

Gets or sets folder which is currently opened in the control.

SelectedItem

Gets or sets item which is currently selected.

SelectedItemIsFile

Gets whether selected item is file.

SelectedItemPath

Gets path of the selected item. When this property is changed, selected item is updated to the item with the specified path.

Sorted

Gets or sets whether foder and file names are sorted.

Methods

AddFile(NewItemInfo)

Adds file to the control.

AddFile(string?, string, SvgImage?)

Adds file to the control.

AddFolder(NewItemInfo)

Adds folder to the control.

AddFolder(string?, string, SvgImage?)

Adds folder to the control.

AddSpecialFolder(SpecialFolder, string?)

Adds special folder specified using Environment.SpecialFolder enumeration.

AddSpecialFolders()

Adds all special folders to the control. VisibleSpecialFolders and HiddenSpecialFolders can be used to specify what folders are added.

ItemIsFile(FileListBoxItem?)

Gets whether item is file.

ItemIsFolder(FileListBoxItem?)

Gets whether item is folder.

OnKeyDown(KeyEventArgs)

Called when the KeyDown event is raised.

Reload()

Reloads contents of the currently opened folder.

Events

AddRootFolder

Occurs when root folder items are added to the control. This event is called when SelectedFolder is assigned with null value.