In This Article

ISelectFileOptions Interface

Defines options for interacting with FileDialog.

public interface ISelectFileOptions

Remarks

For internal use only.

Properties

AddExtension

Indicates whether the dialog box automatically adds an extension to a file name if the user omits the extension.

bool AddExtension { get; set; }

Property Value

bool:

The default value is true.

CheckFileExists

Indicates whether the dialog box displays a warning if the user specifies a file name that does not exist.

bool CheckFileExists { get; set; }

Property Value

bool:

The default value is false.

CheckPathExists

Indicates whether the dialog box displays a warning if the user specifies a path that does not exist.

bool CheckPathExists { get; set; }

Property Value

bool:

The default value is true.

DefaultExt

The default file name extension without the dot (.).

string? DefaultExt { get; set; }

Property Value

string

FileName

The file name selected in the file dialog box.

string? FileName { get; set; }

Property Value

string

Filter

The current file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box.

string? Filter { get; set; }

Property Value

string

FilterIndex

The 1-based index of the filter currently selected in the file dialog box.

int FilterIndex { get; set; }

Property Value

int:

The default value is 1.

InitialDirectory

The initial directory displayed by the file dialog box.

string? InitialDirectory { get; set; }

Property Value

string

RestoreDirectory

A value indicating whether the dialog box restores the directory to the previously selected directory before closing.

bool RestoreDirectory { get; set; }

Property Value

bool:

The default value is false.

Title

The file dialog box title.

string? Title { get; set; }

Property Value

string

Extension Methods