Skip to content

FileDirectoryListbox Class

A listbox control that displays the file system.

C#
public class FileDirectoryListbox : ListBox, IContainer, IList<ControlBase>, ICollection<ControlBase>, IEnumerable<ControlBase>, IEnumerable

Inheritance objectControlBaseCompositeControlListBox

Implements IContainer, IList<ControlBase>, ICollection<ControlBase>, IEnumerable<ControlBase>, IEnumerable

Creates a new instance of the control and uses FileDirectoryListboxItem as the item theme.

C#
public FileDirectoryListbox(int width, int height)

width int
The width of the control.

height int
The height of the control.

FileDirectoryListbox(int, int, ListBoxItemTheme)

Section titled “FileDirectoryListbox(int, int, ListBoxItemTheme)”

Creates a new instance of the control with the specified item theme.

C#
public FileDirectoryListbox(int width, int height, ListBoxItemTheme itemTheme)

width int
The width of the control.

height int
The height of the control.

itemTheme ListBoxItemTheme
The theme to use for the items.

The current folder displayed by the listbox.

C#
public string? CurrentFolder { get; set; }

A . wildcard filesystem filter. Use

;
to split multiple filters.

C#
public string FileFilter { get; set; }

When true, only allows navigation from the root folder of the original value provided to CurrentFolder and below; otherwise false.

C#
public bool OnlyRootAndSubDirs { get; set; }

When true, only displays files that match FileFilter; otherwise false to display all files.

C#
public bool HideNonFilterFiles { get; set; }

A list of extensions of files to highlight, separated by a semicolon. The extension is just the name without any wildcards or periods, in lowercase. Example: txt;json;xml.

C#
public string? HighlightedExtentions { get; set; }

Navigates a directory if a directory is selected. Raises the SelectedItemExecuted event.

C#
protected override void OnItemAction()