Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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