Back to Devexpress

DXOpenFileDialog Class

wpf-devexpress-dot-xpf-dot-dialogs.md

latest2.7 KB
Original Source

DXOpenFileDialog Class

Represents a dialog box that allows end-users to specify a filename for one or more files to open.

Namespace : DevExpress.Xpf.Dialogs

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

NuGet Package : DevExpress.Wpf.Dialogs

Declaration

csharp
public class DXOpenFileDialog :
    DXFileDialog,
    IOpenFileDialog,
    IFileDialog,
    ICommonDialog,
    IDisposable
vb
Public Class DXOpenFileDialog
    Inherits DXFileDialog
    Implements IOpenFileDialog,
               IFileDialog,
               ICommonDialog,
               IDisposable

Remarks

The DXOpenFileDialog provides the standard open file dialog functionality and supports the DevExpress theming mechanism that allows your applications to look consistent.

The DXOpenFileDialog features:

  • Multiple file selection

  • Select files or folders

When an end-user changes a current directory in the DXSaveFileDialog or DXOpenFileDialog , the application’s current directory changes too. The current directory’s path is stored in the DXOpenFileDialog property. You can get the application’s current directory using the WPF standard GetCurrentDirectory method.

The code sample below demonstrates how to run the DXOpenFileDialog that allows end-users to browse and open images.

csharp
private void button_Click(object sender, RoutedEventArgs e) {
    var fileDialog = new DXOpenFileDialog();
    fileDialog.Filter = "Image Files|*.BMP;*.JPG;*.GIF|All files|*.*";
    fileDialog.ShowDialog();
}
vb
Private Sub button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    Dim fileDialog = New DXOpenFileDialog()
    fileDialog.Filter = "Image Files|*.BMP;*.JPG;*.GIF"
    fileDialog.ShowDialog()
End Sub

Inheritance

Object CommonDialog DXCommonDialog DXFileDialog DXOpenFileDialog

See Also

DXOpenFileDialog Members

DevExpress.Xpf.Dialogs Namespace