public sealed record OpenDirectoryOptions : IEquatable<OpenDirectoryOptions> Options for selecting existing local directories.
Parameters
OwnerPolicyThe required dialog ownership;
OwnerPolicy.PreferOwnershows an unowned dialog for a presentation without a native owner.
Constructors
OpenDirectoryOptions
public OpenDirectoryOptions(OwnerPolicy OwnerPolicy = OwnerPolicy.RequireOwner) Options for selecting existing local directories.
Parameters
OwnerPolicyThe required dialog ownership;
OwnerPolicy.PreferOwnershows an unowned dialog for a presentation without a native owner.
Properties
InitialDirectory
public string? InitialDirectory { get; init; } The fully qualified directory the dialog opens in, or null for the platform's choice.
Exceptions
ArgumentExceptionThe path is not fully qualified or contains NUL.
Remarks
A directory that does not exist is ignored by the platform. The xdg-desktop-portal FileChooser before version 4 ignores it.
OwnerPolicy
public OwnerPolicy OwnerPolicy { get; init; } The required dialog ownership; OwnerPolicy.PreferOwner shows an unowned dialog for a presentation without a native owner.
Title
public string? Title { get; init; } The dialog's title, such as "Import backup", or null for the platform's own, such as "Open".
Exceptions
ArgumentExceptionThe title contains NUL.
Remarks
Windows shows it in the dialog's title bar and the xdg-desktop-portal FileChooser and GTK 3 in the dialog's header. A macOS panel has no visible title, so it shows the text as the panel's message above the files.