Skip to main content

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.v24.1.dll

NuGet Package: DevExpress.Wpf.Dialogs

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.

See Also