Table of Contents

Method AddFolderWithFlags

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

AddFolderWithFlags(string?, string, SvgImage?, FolderAdditionFlags)

Adds a folder to the collection with the specified title, path, and optional image, applying the specified folder addition flags.

public virtual bool AddFolderWithFlags(string? title, string path, SvgImage? image = null, FileListBox.FolderAdditionFlags flags = FolderAdditionFlags.LookupAll)

Parameters

title string

The title of the folder. If title is null and flags includes LookupTitle, the title will be retrieved from existing folder information, if available.

path string

The path of the folder to add. This parameter cannot be null or empty.

image SvgImage

An optional image associated with the folder. If image is null and flags includes LookupImage, the image will be retrieved from existing folder information, if available.

flags FileListBox.FolderAdditionFlags

A combination of FileListBox.FolderAdditionFlags values that specify additional behavior when adding the folder, such as looking up the title or image from existing folder information.

Returns

bool

true if the folder was successfully added; otherwise, false.

Remarks

If folder information is available for the specified path, the method can use it to populate the title or image based on the specified flags.