Skip to main content
A newer version of this page is available. .

DXFileDialog.FileName Property

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

Namespace: DevExpress.Xpf.Dialogs

Assembly: DevExpress.Xpf.Dialogs.v18.2.dll

Declaration

public string FileName { get; set; }

Property Value

Type Description
String

The file name selected in the file dialog. The default value is an empty string (“”).

Remarks

The file name includes both the file path and the extension. If no files are selected, this method returns an empty string (“”).

When used from the DXSaveFileDialog class, this property represents the file being saved; when used from the DXOpenFileDialog class, it represents the file being opened.

Use the FileName property when a single file is selected. If you want to return an array containing the names of all selected files in a multiple-selection file dialog (see DXOpenFileDialog.Multiselect), use the DXFileDialog.FileNames property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the FileName property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also