OpenDirectoryOptions record

Namespace Runic.Platform in Runic.Platform 0.23.0

public sealed record OpenDirectoryOptions : IEquatable<OpenDirectoryOptions>

Inherits or implements IEquatable.

Options for selecting existing local directories.

Parameters

OwnerPolicy

The required dialog ownership; OwnerPolicy.PreferOwner shows 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

OwnerPolicy

The required dialog ownership; OwnerPolicy.PreferOwner shows 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

ArgumentException

The 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

ArgumentException

The 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.