RadOpenFileDialog or RadSaveFileDialog with Filter, for example fileDialog.Filter = "Excel Worksheets|*.xlsx;*.xls|All Files|*.*"; fileDialog.FilterIndex = 1; This should filter the files in MainPane on load to xls files only (index is 1-based). However, filter is not applied on load - regression in R3 2018.
Currently RadFileDialogs do not provide such tooltips when hovering files and folders. Check the attached image for clarification.
Create a property that allows to show the UNC name instead of just the drive's letter or change the implementation of the control so this can be achieved by code.
It appears that the display string is the last element of the path, but this can cause potential confusion when the paths are very different, but the last folder is identical. Take for example "C:\Users\Public\Documents" and "C:\Users\<user_name>\Documents". Each of these will be displayed as "Documents" in the final UI, even though the first is probably more recognizable as "Common Documents" or "Public Documents". The icon appears to be different for each, but that's not enough to distinguish them enough without first browsing the path.
This might be a public event (File/FolderSelecting) or property (IsSelectable) of the FileSystemInfoWrapper but user will need a mechanism to set it (control over the file/folder wrapper creation). For example some files might be visible and not filtered in main pane but should be disabled for user selection.
For example user might need to show files in FolderDialog or filter the folders somehow in all dialogs. Currently this could be achieved with custom style for OpenFolderDialogControl, binding the ListBox to CurrentParentDirectory.Children and use converter. By default this binding is to CurrentFileSystemObjects.
In R2 2018 Release we released the standalone usage of ExplorerControl and the CurrentDirectoryPath works only as a setter. When user sets it- it navigates to the directory with the given path. It would be useful for the clients to have this property with working getter - to provide the path of the current folder.
Currently mobile phones are not visible in the navigation tree of the file dialogs.
Make them available like in MS Explorer and file dialogs.
Expose a ShowReadOnly boolean property which will indicate whether the dialog box contains a read-only checkbox and ReadOnlyChecked property indicating whether the read-only check box is selected
Click on Drive / Folder in the Navigation tree should put its Name in the AutoComplete box and then pressing the Open Button of the dialog should choose the selected drive / folder and close the dialog.
Add localization support for RadFileDialogs.
Overrideble properties / methods in DialogViewModels could be added to support custom (or filtered) sources of the navigation TreeView and navigation Breadcrumb. As a temporary solution, users might filter the breadcrumb this way: var breadCrumb = (sender as RadOpenFolderDialog).ChildrenOfType<RadBreadcrumb>().LastOrDefault(); if (breadCrumb != null) { RadBreadcrumbBarItem bar = breadCrumb.ItemContainerGenerator.ContainerFromIndex(0) as RadBreadcrumbBarItem; DirectoryInfoWrapper bDrive = bar.Items.OfType<DirectoryInfoWrapper>().FirstOrDefault(dir => dir.Name.StartsWith("B")); bar.Items.Remove(bDrive); DirectoryInfoWrapper rDrive = bar.Items.OfType<DirectoryInfoWrapper>().FirstOrDefault(dir => dir.Name.StartsWith("R")); bar.Items.Remove(rDrive); } To filter the treeview: var tree = (sender as RadOpenFolderDialog).ChildrenOfType<RadTreeView>().LastOrDefault(); if (tree != null) { tree.LoadOnDemand += Tree_LoadOnDemand; } private void Tree_LoadOnDemand(object sender, Telerik.Windows.RadRoutedEventArgs e) { RadTreeViewItem clickedItem = e.OriginalSource as RadTreeViewItem; List<DirectoryInfoWrapper> dirsToRemove = new List<DirectoryInfoWrapper>(); foreach (DirectoryInfoWrapper dir in clickedItem.Items.OfType<DirectoryInfoWrapper>()) { // removing drives 'R:' and 'B:' for testing purposes. if (dir.Name.StartsWith("R") || dir.Name.StartsWith("B")) { dirsToRemove.Add(dir); } } dirsToRemove.ForEach(dir => clickedItem.Items.Remove(dir)); }
If you open a folder, but you doesn't select a child folder from the list shown in the explorer, when you click on the Open button the FileName property is empty. To work this around you can create a custom RadOpenFolderDialog and override its GetViewModel. Then expose a public property with the view model. And when you close the dialog, check the IsDirectirySelected property of the view model. If so, return the Path property of the view model. Otherwise, use the standard approach and get the folder via the dialog's FileName property. public class CustomOpenFolderDialog : RadOpenFolderDialog { public OpenFolderDialogViewModel ViewModel { get; internal set; } protected override OpenFolderDialogViewModel GetViewModel() { this.ViewModel = base.GetViewModel(); return this.ViewModel; } } --------------------------------- CustomOpenFolderDialog openFolderDialog = new CustomOpenFolderDialog(); openFolderDialog.Owner = this; openFolderDialog.ShowDialog(); if (openFolderDialog.DialogResult == true) { string folderName = String.Empty; if (!openFolderDialog.ViewModel.IsDirectorySelected) { folderName = openFolderDialog.ViewModel.Path; } else { folderName = openFolderDialog.FileName; } }
OpenFolderDialog with no FileName specified. Select Drive C and the press Open Folder - Exception in PreserveLastAccessDirectoryIfNeeded method.