In This Article

ISelectFileOptions Interface

Defines options for interacting with FileDialog.

public interface ISelectFileOptions

Remarks

For internal use only.

Properties

AddExtension

Gets or sets a value indicating whether the dialog box automatically adds an extension to a file name if the user omits the extension. The default value is true.

bool AddExtension { get; set; }

Property Value

bool

CheckFileExists

Gets or sets a value indicating whether the dialog box displays a warning if the user specifies a file name that does not exist. The default value is false.

bool CheckFileExists { get; set; }

Property Value

bool

CheckPathExists

Gets or sets a value indicating whether the dialog box displays a warning if the user specifies a path that does not exist. The default value is true.

bool CheckPathExists { get; set; }

Property Value

bool

DefaultExt

Gets or sets the default file name extension.

string DefaultExt { get; set; }

Property Value

string:

The default file name extension without the period.

FileName

Gets or sets a string containing the file name selected in the file dialog box.

string FileName { get; set; }

Property Value

string

Filter

Gets or sets 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

Gets or sets the 1-based index of the filter currently selected in the file dialog box. The default value is 1.

int FilterIndex { get; set; }

Property Value

int

InitialDirectory

Gets or sets the initial directory displayed by the file dialog box.

string InitialDirectory { get; set; }

Property Value

string

RestoreDirectory

Gets or sets a value indicating whether the dialog box restores the directory to the previously selected directory before closing. The default value is false.

bool RestoreDirectory { get; set; }

Property Value

bool

Title

Gets or sets the file dialog box title.

string Title { get; set; }

Property Value

string