Telerik blogs
DotNetT Dark_870x220

Telerik UI for WinForms now features customizable alternatives to the three most commonly used Windows file and folder manipulation dialogs: OpenFileDialog, SaveFileDialog and OpenFolderDialog. Read on to see how you can use them in your applications.

file dialogs

Telerik UI for WinForms recently introduced RadOpenFileDialog, RadSaveFileDialog and RadOpenFolderDialog, all of which are fully themable, which allows you to achieve a consistent look and feel across the entire WinForms application. They come in handy if you are looking for a more appealing UI, enabling you to replace the standard file dialogs that come with .NET with a modern design and user experience. Here are some of their key features:

  • Easy navigation and history: The dialogs allow you to easily browse the Windows file system through the tree-view-like navigation, the breadcrumb and the history navigation pane. A history of the visited folders is kept so that you can seamlessly jump back and forth between the file system hierarchy. 

  • Search: All dialogs feature convenient search functionality that will not only search into file names, but in file contents as well, utilizing the powerful Windows Search Index.

  • Layouts: The dialogs provide the option to switch between different view modes like List, Tiles, Details, Small, Medium, Large and Extra Large Icons
    Layout modes

  • Variety of Themes: All dialogs are shipped with a rich set of themes that enable you to easily build slick interfaces with the look-and-feel of Crystal, Fluent, Material, Windows and Office design, as well as more than 20 other themes.
    File Dialogs Themes

  • Keyboard support and editing: File dialogs deliver built-in keyboard support. Once the dialog is shown, the user can use arrow keys to navigate through items. File/Folder editing options are also in place. The dialogs provide file and folder names editing via the F2 key or mouse click.

  • Windows File System Synchronization: All operations performed with any of the dialogs are automatically synced with the file system, and will detect and reflect any external changes (the dialogs provide instant UI updates when a file or folder is added, deleted, moved to another directory or renamed).
    File System Synchronization

  • Filter: You can specify a filter for the OpenFileDialog and SaveFileDialog dialogs in order to indicate to the user which types of files should be opened or saved. To enable this functionality you can set the Filter and FilterIndex properties.
    this.radOpenFileDialog1.Filter = "Word Documents|*.doc" +
                "|Excel Worksheets|*.xls;*.xlsx" +
                "|PowerPoint Presentations|*.ppt" +
                "|Office Files|*.doc;*.xls;*.xlsx;*.ppt" +
                "|Image Files|*.jpg;*.png" +
                "|Text Files|*.txt;" +
                "|Archives Files|*.zip;*.rar" +
                "|All Files|*.*";
  • Network locations: In cases where you need to open, save or edit files that are not on your local system, you can use the Network Locations functionality in the File Dialogs of Telerik UI for WinForms to see and access any devices available on the network.

  • Hidden files and folders: You have the option to display hidden files and folders in the file dialogs.
    Hidden files

  • Context menu: To make the user experience fluent, the convenient Windows context menu will be shown when files/folders are being right clicked, featuring all the familiar options it exposes. In addition, when clicking on an empty space the "standard" Windows context menu will pop up including all available options.

  • Directory/Drive filtering: Gives the ability to limit users from browsing through the whole file system. The following code snippet illustrates how to show only directories under the D: drive:
    private void OpenFileDialog_DirectoryRequesting(object sender, DirectoryRequestingEventArgs e)
        if (!e.Directory.FullName.StartsWith(@"D:"))
           e.Cancel = true;

    directory requesting

  • Drag and drop: As of the R2 2019 SP1 release, the file dialogs support drag and drop operations. This feature of the file dialogs allows you to grab items (file and folders) and move them to a different location. It also supports copy and move operations and it is enabled by default. Drag and drop from and to the Windows file explorer is supported out-of-the-box.
    Drag and Drop

What’s Coming

For our upcoming R3 2019 release, which will be here next month, we are planning to release a brand-new navigation bread crumb which will introduce text editing and auto complete in file dialogs. It will also have its own look and feel.

Another cool feature in our roadmap is the custom places (favorites) node in the navigation tree view. It will support the the need fort fast and easy navigation.

For more information please refer to our online documentation and don’t forget to check out the demos in the WinForms Demo application as well. 

As always, please do share your feedback in the comments section below or in our Feedback portal.

About the Author

Todor Vyagov

Todor Vyagov is a Software Developer on the WinForms team at Progress.

Related Posts


Comments are disabled in preview mode.