FileDialog
File/directory path selection dialog; the application performs loading and saving.
Create FileDialog as a child of your UI and set FileMode, Access, Filters and the initial path. Connect FileSelected, FilesSelected or DirSelected for your mode before opening it. Call PopupFileDialog to show it. Changing properties does not itself open the window or confirm a choice.
OpenFile selects one file, OpenFiles multiple files, and OpenDir a directory. OpenAny can emit FileSelected or DirSelected, so handle both. SaveFile chooses a destination and also reports FileSelected; it does not create or write the file. The application opens FileAccess/ResourceLoader, checks the result and displays errors.
Access.Resources confines navigation to asset://, Userdata to user://, and Filesystem uses the OS-accessible filesystem. This does not grant permissions. User saves normally belong in user://; asset:// can be unwritable in an exported application. Set the initial directory again after changing Access: the previous RootSubfolder restriction is reset.
CurrentDir is the directory, CurrentFile the filename text, and CurrentPath their combination. Use CurrentPath for a full path and CurrentFile for a name within the current directory. CurrentPath without a separator changes only the name; an empty string resets nothing. These properties create neither directories nor files, and setters return no Error: read back the actual path and check I/O separately.
Filters is a mask list, for example .png,.jpg ; Images. Use *.png for an extension; .png alone is not an extension mask. Exact filenames are also valid. AddFilter takes a mask, label and optional MIME; MIME is the third semicolon-separated field in a string list. Arrays are copied: editing a returned Filters array does not change the dialog. A filter aids navigation/extension selection rather than proving file-content format.
UseNativeDialog requests an OS dialog when platform support is available. Filter and extra-option capabilities depend on the backend; OS sandboxing can require the native path independently of this flag. GetVBox/GetLineEdit concern the built-in UI rather than OS window controls. Configure presentation before opening.
GetLineEdit returns the dialog-owned filename field rather than a search field. GetVBox returns its internal container. Configure them without separately freeing or reparenting them. Cancellation is not a successful selection; absence of FileSelected does not replace handling inherited Canceled yourself.
Invalidate schedules an update for a visible built-in list. It does not immediately scan the directory for a hidden dialog. Do not use it instead of checking file existence before I/O. An overwrite warning likewise does not replace checking the save result.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
FileDialogConstructor
public FileDialog();Creates a hidden SaveFile dialog with Resources access. Initial configuration neither creates a file nor opens an OS window.
Properties25
AccessProperty
public FileDialog.AccessEnum Access { get; set; }Navigation scope: Resources (asset://), Userdata (user://) or Filesystem. Default Resources. Does not grant OS permissions; changing it resets RootSubfolder, so configure directory state again.
CurrentDirProperty
public string CurrentDir { get; set; }Current directory rather than selected file. Prefer an explicit asset://, user:// or absolute path appropriate to Access. Setter neither creates a directory nor confirms a selection.
CurrentFileProperty
public string CurrentFile { get; set; }Filename-field text, normally without a directory. Does not load/create a file or emit FileSelected. Use CurrentPath for a full path.
CurrentPathProperty
public string CurrentPath { get; set; }Combination of CurrentDir and CurrentFile. A full-path setter sets directory/name; a separator-free path changes only the name, while empty input is a no-op. Does not prove the file exists.
DeletingEnabledProperty
public bool DeletingEnabled { get; set; }Allows the built-in list’s delete action, which moves a selected item to trash when executed. The flag itself deletes nothing; false does not prohibit application FileAccess/DirAccess.
DisplayModeProperty
public FileDialog.DisplayModeEnum DisplayMode { get; set; }Built-in list presentation: Thumbnails or List. Does not change FileMode, Access or file-read results. Thumbnail quality depends on the configured thumbnail provider.
DriveSelectorEnabledProperty
public bool DriveSelectorEnabled { get; set; }Show the drive selector where applicable to Access/platform. Does not grant access to every OS drive.
FavoritesEnabledProperty
public bool FavoritesEnabled { get; set; }Show favorites in built-in UI. Does not clear the shared SetFavoriteList list.
FileFilterToggleEnabledProperty
public bool FileFilterToggleEnabled { get; set; }Show the filename-search-row toggle. true shows the button rather than enabling the search itself; separate from extension masks in Filters.
FileModeProperty
public FileDialog.FileModeEnum FileMode { get; set; }Selection mode: OpenFile, OpenFiles, OpenDir, OpenAny or SaveFile. Default SaveFile. Changes standard labels/selection behavior rather than performing I/O; a custom Title is retained.
FileNameFilterProperty
public string FileNameFilter { get; set; }Built-in filename search text, separate from extension masks in Filters. Setter clears the query while the search row is disabled. Use Filters for persistent extension filtering. Do not trust the FileNameFilterChanged argument: installed Runtime has a type mismatch.
FileSortOptionsEnabledProperty
public bool FileSortOptionsEnabled { get; set; }Show file-sort UI. Does not change filenames/file contents or Filters array order.
FiltersProperty
public string[] Filters { get; set; }String array of mask ; label ; MIME, with trailing fields optional. Commas separate masks within a group. Getter returns a copy; setter replaces the list rather than validating file contents.
FiltersEnabledProperty
public bool FiltersEnabled { get; set; }Show the extension-filter dropdown. Does not clear Filters and is not the filename-search toggle.
FolderCreationEnabledProperty
public bool FolderCreationEnabled { get; set; }Allows directory-creation UI in applicable FileMode values. Assignment does not create a directory or prohibit your own DirAccess calls.
public bool HiddenFilesToggleEnabled { get; set; }Show the hidden-file toggle. Separate from ShowHiddenFiles: hiding the button does not change the current hidden-file setting.
LayoutToggleEnabledProperty
public bool LayoutToggleEnabled { get; set; }Show the Thumbnails/List toggle. Does not reset current DisplayMode.
ModeOverridesTitleProperty · Deprecated
public bool ModeOverridesTitle { get; set; }Legacy flag: setter does nothing and getter returns true. Set Title for your caption; installed SDK retains a custom Title when FileMode changes.
NavigationButtonsEnabledProperty
public bool NavigationButtonsEnabled { get; set; }Show back/forward buttons. Does not block programmatic CurrentDir/CurrentPath.
OptionCountProperty
public int OptionCount { get; set; }Extra-setting count. Shrinking retains the list prefix; growing creates empty records needing unique names, values and defaults. Changes can rebuild the UI and reset current answers to defaults.
OverwriteWarningEnabledProperty
public bool OverwriteWarningEnabled { get; set; }Request confirmation for an existing SaveFile destination. FileDialog does not write it; check your own save result even after confirmation.
RecentListEnabledProperty
public bool RecentListEnabled { get; set; }Show recent directories in built-in UI. Does not clear the shared SetRecentList list.
RootSubfolderProperty
public string RootSubfolder { get; set; }Existing directory restricting built-in UI navigation within Access. Empty input clears the setting; changing Access resets it. Does not create the directory or provide a security boundary for your own FileAccess: validate the final path separately.
public bool ShowHiddenFiles { get; set; }Show hidden items in the built-in list, default false. Does not switch FileMode or grant access to hidden/protected files.
UseNativeDialogProperty
public bool UseNativeDialog { get; set; }Requests an OS dialog when the platform supports the needed features. false does not guarantee built-in UI in an OS sandbox; true does not guarantee support for arbitrary added Controls. Configure before opening.
Methods56
AddFilter2 overloads
public void AddFilter(string filter, string description);Short overload adds a mask/label with empty MIME. Use the mimeType overload for MIME; filters do not validate file contents.
| Name | Type | Default |
|---|---|---|
filter | string | — |
description | string | — |
filterMask group such as .png,.jpg rather than .png without *.
descriptionHuman-readable filter-group label.
public void AddFilter(string filter, string description = "", string mimeType = "");Adds mask group, label and optional MIME. Example mask: .png,.jpg; do not use .png without *. Does not confirm selection or prove content format.
| Name | Type | Default |
|---|---|---|
filter | string | — |
description | string | "" |
mimeType | string | "" |
filterMask group such as .png,.jpg rather than .png without *.
descriptionHuman-readable filter-group label.
mimeTypeOptional MIME for backends supporting it.
AddOption2 overloads
public void AddOption(string name, ReadOnlySpan<string> values, int defaultValueIndex);Adds an extra setting with a unique name. Empty values defines a checkbox with defaultValueIndex 0/1; nonempty values defines a choice list with index 0…Length-1. Default is clamped to that range. Built-in controls materialize when the visible dialog updates.
| Name | Type | Default |
|---|---|---|
name | string | — |
values | ReadOnlySpan<string> | — |
defaultValueIndex | int | — |
nameUnique stable extra-setting key/label.
valuesChoice array; empty input defines a checkbox. Copied.
defaultValueIndexDefault: 0/1 for checkbox or choice index, clamped to the valid range.
public void AddOption(string name, string[] values, int defaultValueIndex);Adds an extra setting with a unique name. Empty values defines a checkbox with defaultValueIndex 0/1; nonempty values defines a choice list with index 0…Length-1. Default is clamped to that range. Built-in controls materialize when the visible dialog updates.
| Name | Type | Default |
|---|---|---|
name | string | — |
values | string[] | — |
defaultValueIndex | int | — |
nameUnique stable extra-setting key/label.
valuesChoice array; empty input defines a checkbox. Copied.
defaultValueIndexDefault: 0/1 for checkbox or choice index, clamped to the valid range.
ClearFileNameFiltervoid
public void ClearFileNameFilter();Clears filename search and updates built-in UI. Does not remove Filters masks, the chosen path or files. Account for the FileNameFilterChanged payload mismatch when observing notification.
ClearFiltersvoid
public void ClearFilters();Removes filter groups while retaining filename text. Does not reset the path or remove OS restrictions.
DeselectAllvoid
public void DeselectAll();Deselects list items and updates confirmation availability. Does not delete files or emit successful selection.
GetAccessFileDialog.AccessEnum
public FileDialog.AccessEnum GetAccess();Navigation scope: Resources (asset://), Userdata (user://) or Filesystem. Default Resources. Does not grant OS permissions; changing it resets RootSubfolder, so configure directory state again.
FileDialog.AccessEnumNavigation scope: Resources (asset://), Userdata (user://) or Filesystem. Default Resources. Does not grant OS permissions; changing it resets RootSubfolder, so configure directory state again.
GetCurrentDirstring
public string GetCurrentDir();Current directory rather than selected file. Prefer an explicit asset://, user:// or absolute path appropriate to Access. Setter neither creates a directory nor confirms a selection.
stringCurrent directory rather than selected file. Prefer an explicit asset://, user:// or absolute path appropriate to Access. Setter neither creates a directory nor confirms a selection.
GetCurrentFilestring
public string GetCurrentFile();Filename-field text, normally without a directory. Does not load/create a file or emit FileSelected. Use CurrentPath for a full path.
stringFilename-field text, normally without a directory. Does not load/create a file or emit FileSelected. Use CurrentPath for a full path.
GetCurrentPathstring
public string GetCurrentPath();Combination of CurrentDir and CurrentFile. A full-path setter sets directory/name; a separator-free path changes only the name, while empty input is a no-op. Does not prove the file exists.
stringCombination of CurrentDir and CurrentFile. A full-path setter sets directory/name; a separator-free path changes only the name, while empty input is a no-op. Does not prove the file exists.
GetDisplayModeFileDialog.DisplayModeEnum
public FileDialog.DisplayModeEnum GetDisplayMode();Built-in list presentation: Thumbnails or List. Does not change FileMode, Access or file-read results. Thumbnail quality depends on the configured thumbnail provider.
FileDialog.DisplayModeEnumBuilt-in list presentation: Thumbnails or List. Does not change FileMode, Access or file-read results. Thumbnail quality depends on the configured thumbnail provider.
GetFavoriteListstring[]
public static string[] GetFavoriteList();Main thread: returns a copy of the shared favorite-directory list. Editing the array does not change the global list; use SetFavoriteList.
string[]Main thread: returns a copy of the shared favorite-directory list. Editing the array does not change the global list; use SetFavoriteList.
GetFileModeFileDialog.FileModeEnum
public FileDialog.FileModeEnum GetFileMode();Selection mode: OpenFile, OpenFiles, OpenDir, OpenAny or SaveFile. Default SaveFile. Changes standard labels/selection behavior rather than performing I/O; a custom Title is retained.
FileDialog.FileModeEnumSelection mode: OpenFile, OpenFiles, OpenDir, OpenAny or SaveFile. Default SaveFile. Changes standard labels/selection behavior rather than performing I/O; a custom Title is retained.
GetFileNameFilterstring
public string GetFileNameFilter();Built-in filename search text, separate from extension masks in Filters. Setter clears the query while the search row is disabled. Use Filters for persistent extension filtering. Do not trust the FileNameFilterChanged argument: installed Runtime has a type mismatch.
stringBuilt-in filename search text, separate from extension masks in Filters. Setter clears the query while the search row is disabled. Use Filters for persistent extension filtering. Do not trust the FileNameFilterChanged argument: installed Runtime has a type mismatch.
GetFiltersstring[]
public string[] GetFilters();String array of mask ; label ; MIME, with trailing fields optional. Commas separate masks within a group. Getter returns a copy; setter replaces the list rather than validating file contents.
string[]String array of mask ; label ; MIME, with trailing fields optional. Commas separate masks within a group. Getter returns a copy; setter replaces the list rather than validating file contents.
GetLineEditLineEdit
public LineEdit GetLineEdit();Shared internal filename field. Its Text is reflected in CurrentFile; not the filter field. Do not free/reparent it separately; it is not an OS-native window control.
LineEditShared internal filename field. Its Text is reflected in CurrentFile; not the filter field. Do not free/reparent it separately; it is not an OS-native window control.
GetOptionCountint
public int GetOptionCount();Extra-setting count. Shrinking retains the list prefix; growing creates empty records needing unique names, values and defaults. Changes can rebuild the UI and reset current answers to defaults.
intExtra-setting count. Shrinking retains the list prefix; growing creates empty records needing unique names, values and defaults. Changes can rebuild the UI and reset current answers to defaults.
GetOptionDefaultint
public int GetOptionDefault(int option);Returns the schema default rather than the current user answer: 0/1 for checkbox or a choice index.
| Name | Type | Default |
|---|---|---|
option | int | — |
optionSetting index; SetOption* accepts negative indices from the end, getters require an ordinary valid index.
intReturns the schema default rather than the current user answer: 0/1 for checkbox or a choice index.
GetOptionNamestring
public string GetOptionName(int option);Setting name at an ordinary valid index. Used as a GetSelectedOptions key, so names should be unique and stable.
| Name | Type | Default |
|---|---|---|
option | int | — |
optionSetting index; SetOption* accepts negative indices from the end, getters require an ordinary valid index.
stringSetting name at an ordinary valid index. Used as a GetSelectedOptions key, so names should be unique and stable.
GetOptionValuesstring[]
public string[] GetOptionValues(int option);Returns a copy of choice labels. An empty array means checkbox rather than no setting. Use SetOptionValues to change them.
| Name | Type | Default |
|---|---|---|
option | int | — |
optionSetting index; SetOption* accepts negative indices from the end, getters require an ordinary valid index.
string[]Returns a copy of choice labels. An empty array means checkbox rather than no setting. Use SetOptionValues to change them.
GetRecentListstring[]
public static string[] GetRecentList();Main thread: copy of the shared recent-directory list. These are navigation directories rather than a history of every opened file.
string[]Main thread: copy of the shared recent-directory list. These are navigation directories rather than a history of every opened file.
GetRootSubfolderstring
public string GetRootSubfolder();Existing directory restricting built-in UI navigation within Access. Empty input clears the setting; changing Access resets it. Does not create the directory or provide a security boundary for your own FileAccess: validate the final path separately.
stringExisting directory restricting built-in UI navigation within Access. Empty input clears the setting; changing Access resets it. Does not create the directory or provide a security boundary for your own FileAccess: validate the final path separately.
GetSelectedOptionsReckfell.Collections.Dictionary
public Reckfell.Collections.Dictionary GetSelectedOptions();Returns a shared Dictionary of name → bool/current choice index. Can be empty before controls materialize even when OptionCount > 0. Rebuilding options resets it to defaults. Copy accepted values into your model; do not treat dictionary mutation as an official setter.
Reckfell.Collections.DictionaryReturns a shared Dictionary of name → bool/current choice index. Can be empty before controls materialize even when OptionCount > 0. Rebuilding options resets it to defaults. Copy accepted values into your model; do not treat dictionary mutation as an official setter.
GetUseNativeDialogbool
public bool GetUseNativeDialog();Requests an OS dialog when the platform supports the needed features. false does not guarantee built-in UI in an OS sandbox; true does not guarantee support for arbitrary added Controls. Configure before opening.
boolRequests an OS dialog when the platform supports the needed features. false does not guarantee built-in UI in an OS sandbox; true does not guarantee support for arbitrary added Controls. Configure before opening.
GetVBoxVBoxContainer
public VBoxContainer GetVBox();Shared internal VBoxContainer of the built-in dialog. Add UI while retaining FileDialog ownership; an OS backend need not display those Controls.
VBoxContainerShared internal VBoxContainer of the built-in dialog. Add UI while retaining FileDialog ownership; an OS backend need not display those Controls.
Invalidatevoid
public void Invalidate();Schedules an update of the visible built-in list; does not immediately scan for a hidden dialog. Neither a file-existence check nor selection confirmation.
IsCustomizationFlagEnabledbool
public bool IsCustomizationFlagEnabled(FileDialog.Customization flag);Returns this instance’s Customization setting. A UI/confirmation policy rather than OS permission for a file operation.
| Name | Type | Default |
|---|---|---|
flag | FileDialog.Customization | — |
flagFileDialog.Customization setting for this instance.
boolReturns this instance’s Customization setting. A UI/confirmation policy rather than OS permission for a file operation.
IsModeOverridingTitlebool
public bool IsModeOverridingTitle();Legacy flag: setter does nothing and getter returns true. Set Title for your caption; installed SDK retains a custom Title when FileMode changes.
boolLegacy flag: setter does nothing and getter returns true. Set Title for your caption; installed SDK retains a custom Title when FileMode changes.
public bool IsShowingHiddenFiles();Show hidden items in the built-in list, default false. Does not switch FileMode or grant access to hidden/protected files.
boolShow hidden items in the built-in list, default false. Does not switch FileMode or grant access to hidden/protected files.
PopupFileDialogvoid
public void PopupFileDialog();Opens the dialog with standard viewport-relative sizing/constraints. Set mode, access, filters and selection handlers first. Can use an OS backend; does not itself read/write the file.
SetAccessvoid
public void SetAccess(FileDialog.AccessEnum access);Navigation scope: Resources (asset://), Userdata (user://) or Filesystem. Default Resources. Does not grant OS permissions; changing it resets RootSubfolder, so configure directory state again.
| Name | Type | Default |
|---|---|---|
access | FileDialog.AccessEnum | — |
accessResources, Userdata or Filesystem for the intended path scope.
SetCurrentDirvoid
public void SetCurrentDir(string dir);Current directory rather than selected file. Prefer an explicit asset://, user:// or absolute path appropriate to Access. Setter neither creates a directory nor confirms a selection.
| Name | Type | Default |
|---|---|---|
dir | string | — |
dirDirectory appropriate to Access; in DirSelected, the accepted directory.
SetCurrentFilevoid
public void SetCurrentFile(string file);Filename-field text, normally without a directory. Does not load/create a file or emit FileSelected. Use CurrentPath for a full path.
| Name | Type | Default |
|---|---|---|
file | string | — |
fileFilename in the current directory; use CurrentPath for a full path.
SetCurrentPathvoid
public void SetCurrentPath(string path);Combination of CurrentDir and CurrentFile. A full-path setter sets directory/name; a separator-free path changes only the name, while empty input is a no-op. Does not prove the file exists.
| Name | Type | Default |
|---|---|---|
path | string | — |
pathPath within the selected Access scope; selection does not prove successful I/O.
SetCustomizationFlagEnabledvoid
public void SetCustomizationFlagEnabled(FileDialog.Customization flag, bool enabled);Changes a UI/confirmation setting. Does not perform file operations, change the application model or grant OS permissions.
| Name | Type | Default |
|---|---|---|
flag | FileDialog.Customization | — |
enabled | bool | — |
flagFileDialog.Customization setting for this instance.
enabledEnable the specified UI/confirmation policy.
SetDisplayModevoid
public void SetDisplayMode(FileDialog.DisplayModeEnum mode);Built-in list presentation: Thumbnails or List. Does not change FileMode, Access or file-read results. Thumbnail quality depends on the configured thumbnail provider.
| Name | Type | Default |
|---|---|---|
mode | FileDialog.DisplayModeEnum | — |
modeFileModeEnum for selection behavior or DisplayModeEnum for list presentation, according to the parameter type.
SetFavoriteList2 overloads
public static void SetFavoriteList(ReadOnlySpan<string> favorites);Replaces the process-wide FileDialog favorite-directory list; call on the main thread. Appends a trailing /. Not an instance-local list or automatic disk persistence. UI list refresh is separate.
| Name | Type | Default |
|---|---|---|
favorites | ReadOnlySpan<string> | — |
favoritesReplacement shared favorite-directory list, used on the main thread.
public static void SetFavoriteList(string[] favorites);Replaces the process-wide FileDialog favorite-directory list; call on the main thread. Appends a trailing /. Not an instance-local list or automatic disk persistence. UI list refresh is separate.
| Name | Type | Default |
|---|---|---|
favorites | string[] | — |
favoritesReplacement shared favorite-directory list, used on the main thread.
SetFileModevoid
public void SetFileMode(FileDialog.FileModeEnum mode);Selection mode: OpenFile, OpenFiles, OpenDir, OpenAny or SaveFile. Default SaveFile. Changes standard labels/selection behavior rather than performing I/O; a custom Title is retained.
| Name | Type | Default |
|---|---|---|
mode | FileDialog.FileModeEnum | — |
modeFileModeEnum for selection behavior or DisplayModeEnum for list presentation, according to the parameter type.
SetFileNameFiltervoid
public void SetFileNameFilter(string filter);Built-in filename search text, separate from extension masks in Filters. Setter clears the query while the search row is disabled. Use Filters for persistent extension filtering. Do not trust the FileNameFilterChanged argument: installed Runtime has a type mismatch.
| Name | Type | Default |
|---|---|---|
filter | string | — |
filterSearch query; the SDK FileNameFilterChanged argument is unreliable due to a native type mismatch.
SetFilters2 overloads
public void SetFilters(ReadOnlySpan<string> filters);String array of mask ; label ; MIME, with trailing fields optional. Commas separate masks within a group. Getter returns a copy; setter replaces the list rather than validating file contents.
| Name | Type | Default |
|---|---|---|
filters | ReadOnlySpan<string> | — |
filtersReplacement array of mask ; label ; MIME groups.
public void SetFilters(string[] filters);String array of mask ; label ; MIME, with trailing fields optional. Commas separate masks within a group. Getter returns a copy; setter replaces the list rather than validating file contents.
| Name | Type | Default |
|---|---|---|
filters | string[] | — |
filtersReplacement array of mask ; label ; MIME groups.
SetGetIconCallbackvoid
public static void SetGetIconCallback(Callable callback);Installs a shared static icon provider for built-in FileDialogs: Callable receives one path string and returns Texture2D or null for fallback. Not instance-local. Avoid capturing a short-lived dialog; manage provider lifetime at application level.
| Name | Type | Default |
|---|---|---|
callback | Callable | — |
callbackShared Callable: path string → Texture2D or null for fallback.
SetGetThumbnailCallbackvoid
public static void SetGetThumbnailCallback(Callable callback);Shared static thumbnail provider: one path string → Texture2D or null for default fallback. Used by built-in Thumbnails mode rather than guaranteeing native OS thumbnails. Cache prepared images and avoid blocking UI with expensive callback generation.
| Name | Type | Default |
|---|---|---|
callback | Callable | — |
callbackShared Callable: path string → Texture2D or null for fallback.
SetModeOverridesTitlevoid
public void SetModeOverridesTitle(bool @override);Legacy flag: setter does nothing and getter returns true. Set Title for your caption; installed SDK retains a custom Title when FileMode changes.
| Name | Type | Default |
|---|---|---|
override | bool | — |
overrideIgnored; the legacy setter leaves the getter true.
SetOptionCountvoid
public void SetOptionCount(int count);Extra-setting count. Shrinking retains the list prefix; growing creates empty records needing unique names, values and defaults. Changes can rebuild the UI and reset current answers to defaults.
| Name | Type | Default |
|---|---|---|
count | int | — |
countNonnegative number of extra-setting records.
SetOptionDefaultvoid
public void SetOptionDefault(int option, int defaultValueIndex);Sets a default clamped to 0…1 for checkbox or 0…values.Length-1 for a choice list. Accepts a negative setting index; not a silent setter for one current answer in an open dialog.
| Name | Type | Default |
|---|---|---|
option | int | — |
defaultValueIndex | int | — |
optionSetting index; SetOption* accepts negative indices from the end, getters require an ordinary valid index.
defaultValueIndexDefault: 0/1 for checkbox or choice index, clamped to the valid range.
SetOptionNamevoid
public void SetOptionName(int option, string name);Changes the setting key/label; accepts negative indices from the end. Rebuilding controls can reset current answers: configure the schema before opening.
| Name | Type | Default |
|---|---|---|
option | int | — |
name | string | — |
optionSetting index; SetOption* accepts negative indices from the end, getters require an ordinary valid index.
nameUnique stable extra-setting key/label.
SetOptionValues2 overloads
public void SetOptionValues(int option, ReadOnlySpan<string> values);Replaces choices by copying the array; empty input switches the setting to a checkbox. Stored default is clamped to the new range. Accepts negative indices and can rebuild UI.
| Name | Type | Default |
|---|---|---|
option | int | — |
values | ReadOnlySpan<string> | — |
optionSetting index; SetOption* accepts negative indices from the end, getters require an ordinary valid index.
valuesChoice array; empty input defines a checkbox. Copied.
public void SetOptionValues(int option, string[] values);Replaces choices by copying the array; empty input switches the setting to a checkbox. Stored default is clamped to the new range. Accepts negative indices and can rebuild UI.
| Name | Type | Default |
|---|---|---|
option | int | — |
values | string[] | — |
optionSetting index; SetOption* accepts negative indices from the end, getters require an ordinary valid index.
valuesChoice array; empty input defines a checkbox. Copied.
SetRecentList2 overloads
public static void SetRecentList(ReadOnlySpan<string> recents);Replaces the process-wide recent-directory list on the main thread, appending trailing /. Does not itself rewrite a user settings file.
| Name | Type | Default |
|---|---|---|
recents | ReadOnlySpan<string> | — |
recentsReplacement shared recent-directory list, used on the main thread.
public static void SetRecentList(string[] recents);Replaces the process-wide recent-directory list on the main thread, appending trailing /. Does not itself rewrite a user settings file.
| Name | Type | Default |
|---|---|---|
recents | string[] | — |
recentsReplacement shared recent-directory list, used on the main thread.
SetRootSubfoldervoid
public void SetRootSubfolder(string dir);Existing directory restricting built-in UI navigation within Access. Empty input clears the setting; changing Access resets it. Does not create the directory or provide a security boundary for your own FileAccess: validate the final path separately.
| Name | Type | Default |
|---|---|---|
dir | string | — |
dirExisting directory within Access; empty input clears the root setting.
public void SetShowHiddenFiles(bool show);Show hidden items in the built-in list, default false. Does not switch FileMode or grant access to hidden/protected files.
| Name | Type | Default |
|---|---|---|
show | bool | — |
showShow hidden list entries.
SetUseNativeDialogvoid
public void SetUseNativeDialog(bool native);Requests an OS dialog when the platform supports the needed features. false does not guarantee built-in UI in an OS sandbox; true does not guarantee support for arbitrary added Controls. Configure before opening.
| Name | Type | Default |
|---|---|---|
native | bool | — |
nativeRequest an OS-native backend; set before opening.
Signals and events4
DirSelectedEvent
public event FileDialog.DirSelectedEventHandler DirSelected;Directory accepted in OpenDir or as an OpenAny directory result. A directory rather than a destination filename; the signal does not mean FileDialog created it.
| Name | Type | Default |
|---|---|---|
dir | string | — |
dirDirectory appropriate to Access; in DirSelected, the accepted directory.
FileNameFilterChangedEvent
public event FileDialog.FileNameFilterChangedEventHandler FileNameFilterChanged;Runtime/SDK 1.0.0 limitation: the native signal supplies an OptionButton object while the SDK declares string. Do not use filter as text. Workaround: Connect(FileDialog.SignalName.FileNameFilterChanged, Callable.From<Variant>(handler)), with a handler that ignores payload and reads the dialog’s FileNameFilter. Retain the Callable for Disconnect.
| Name | Type | Default |
|---|---|---|
filter | string | — |
filterSearch query; the SDK FileNameFilterChanged argument is unreliable due to a native type mismatch.
FileSelectedEvent
public event FileDialog.FileSelectedEventHandler FileSelected;One path accepted: OpenFile, a file result of OpenAny, or SaveFile. In SaveFile it may not exist yet. The signal does not mean successful reading/writing; perform and check I/O separately.
| Name | Type | Default |
|---|---|---|
path | string | — |
pathPath within the selected Access scope; selection does not prove successful I/O.
FilesSelectedEvent
public event FileDialog.FilesSelectedEventHandler FilesSelected;Path array accepted in OpenFiles mode. Validate each path/file separately; changing settings or CurrentPath does not emit this signal.
| Name | Type | Default |
|---|---|---|
paths | string[] | — |
pathsArray of accepted OpenFiles paths.
FileDialog.AccessEnum
| Value | Description |
|---|---|
Filesystem = 2 | The dialog allows accessing files on the whole file system. |
Resources = 0 | The dialog only allows accessing files under the |
Userdata = 1 | The dialog only allows accessing files under user data path ( |
FileDialog.Customization
| Value | Description |
|---|---|
CreateFolder = 1 | If enabled, shows the button for creating new directories (when using |
Delete = 8 | If enabled, the context menu will show the "Delete" option, which allows moving files and folders to trash.
Equivalent to |
DriveSelector = 10 | If enabled, shows the drive select dropdown next to the current path.
Equivalent to |
Favorites = 4 | If enabled, shows the toggle favorite button and favorite list on the left side of the dialog.
Equivalent to |
FileFilter = 2 | If enabled, shows the toggle file filter button.
Equivalent to |
FileSort = 3 | If enabled, shows the file sorting options button.
Equivalent to |
Filters = 11 | If enabled, shows the file extension filter dropdown next to the file name.
Equivalent to |
Layout = 6 | If enabled, shows the layout switch buttons (list/thumbnails).
Equivalent to |
NavigationButtons = 9 | If enabled, shows the go back/forward buttons on the toolbar.
Equivalent to |
OverwriteWarning = 7 | If enabled, the |
Recent = 5 | If enabled, shows the recent directories list on the left side of the dialog.
Equivalent to |
FileDialog.DisplayModeEnum
| Value | Description |
|---|---|
List = 1 | The dialog displays files as a list of filenames. |
Thumbnails = 0 | The dialog displays files as a grid of thumbnails. Use |
FileDialog.FileModeEnum
| Value | Description |
|---|---|
OpenAny = 3 | The dialog allows selecting one file or directory. |
OpenDir = 2 | The dialog only allows selecting a directory, disallowing the selection of any file. |
OpenFile = 0 | The dialog allows selecting one, and only one file. |
OpenFiles = 1 | The dialog allows selecting multiple files. |
SaveFile = 4 | The dialog will warn when a file exists. |
Theme properties
These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.
| Key and type | Description |
|---|---|
file_disabled_colorColor | The color tint for disabled files (when the Color(1, 1, 1, 0.25) |
file_icon_colorColor | The color modulation applied to the file icon. Default:Color(1, 1, 1, 1) |
folder_icon_colorColor | The color modulation applied to the folder icon. Default:Color(1, 1, 1, 1) |
thumbnail_sizeint | The size of thumbnail icons when 64 |
back_folderTexture2D | Custom icon for the back arrow. |
create_folderTexture2D | Custom icon for the create folder button. |
favoriteTexture2D | Custom icon for favorite folder button. |
favorite_downTexture2D | Custom icon for button to move down a favorite entry. |
favorite_upTexture2D | Custom icon for button to move up a favorite entry. |
fileTexture2D | Custom icon for files. |
file_thumbnailTexture2D | Icon for files when in thumbnail mode. |
folderTexture2D | Custom icon for folders. |
folder_thumbnailTexture2D | Icon for folders when in thumbnail mode. |
forward_folderTexture2D | Custom icon for the forward arrow. |
list_modeTexture2D | Icon for the button that enables list mode. |
menu_copy_pathTexture2D | Icon for the "Copy Path" context menu option. |
menu_deleteTexture2D | Icon for the "Delete" context menu option. |
menu_new_folderTexture2D | Icon for the "New Folder..." context menu option. Usually it should be the same as |
menu_open_bundleTexture2D | Icon for the "Show Package Contents" context menu option. The option only appears for macOS bundles. |
menu_refreshTexture2D | Icon for the "Refresh" context menu option. Usually it should be the same as |
menu_show_in_file_managerTexture2D | Icon for the "Show in File Manager" context menu option. |
parent_folderTexture2D | Custom icon for the parent folder arrow. |
reloadTexture2D | Custom icon for the reload button. |
sortTexture2D | Custom icon for the sorting options menu. |
thumbnail_modeTexture2D | Icon for the button that enables thumbnail mode. |
toggle_filename_filterTexture2D | Custom icon for the toggle button for the filter for file names. |