Interface IUIFileSelector
A component that represents a drop zone and selector for files, folders, images coming from the clipboard.
Inherited Members
Namespace: DevToys.Api
Assembly: DevToys.Api.dll
Syntax
public interface IUIFileSelector : IUIElement
Properties
AllowedFileExtensions
Gets the list of file extensions allowed to be selected. An empty list of file extensions indicates any kind of file.
Declaration
string[] AllowedFileExtensions { get; }
Property Value
Type | Description |
---|---|
string[] |
CanSelectManyFiles
Gets whether the user is allowed to select more than one file.
Declaration
bool CanSelectManyFiles { get; }
Property Value
Type | Description |
---|---|
bool |
OnFilesSelectedAction
Gets the action to run when the user selected file(s).
Declaration
Func<SandboxedFileReader[], ValueTask>? OnFilesSelectedAction { get; }
Property Value
Type | Description |
---|---|
Func<SandboxedFileReader[], ValueTask> |
Remarks
The items contain a stream. It won't be disposed automatically. It is important to dispose the stream yourself, when not needed anymore
SelectedFiles
Gets the list of absolute path to the file(s) the user selected.
Declaration
SandboxedFileReader[] SelectedFiles { get; }
Property Value
Type | Description |
---|---|
SandboxedFileReader[] |
Remarks
The items contain a stream. It won't be disposed automatically. It is important to dispose the stream yourself, when not needed anymore
Events
AllowedFileExtensionsChanged
Raised when AllowedFileExtensions is changed.
Declaration
event EventHandler? AllowedFileExtensionsChanged
Event Type
Type | Description |
---|---|
EventHandler |
CanSelectManyFilesChanged
Raised when CanSelectManyFiles is changed.
Declaration
event EventHandler? CanSelectManyFilesChanged
Event Type
Type | Description |
---|---|
EventHandler |