FileDialogs are constructed by RadWindow and ExplorerControl as its content. Explorer control holds navigation tree, autocomplete, filtering combobox, main pane for viewing fodler and files, search box, breadcrumb. You can check all visual parts in the following help article: http://docs.telerik.com/devtools/wpf/controls/radfiledialogs/visual-structure Users might need to put the ExplorerControl in non-window parts of their application (for example in docked RadPane of RadDocking. Also, they might need to override OK/Cancel commands for that purpose.
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.
Some files that can be seen in the Windows Explorer are missing from the ExplorerControl of the file dialogs. This happens because of a silent ArgumentOutOfRangeException thrown for a corrupted file that doesn't have a "Date Modified" attribute set. This breaks the loading of the following files in the directory.
Here are the exception details:
System.ArgumentOutOfRangeException: Not a valid Win32 FileTime. Parameter name: fileTime at System.DateTime.FromFileTimeUtc(Int64 fileTime) at System.IO.FileSystemInfo.get_LastWriteTimeUtc() at System.IO.FileSystemInfo.get_LastWriteTime() at Telerik.Windows.Controls.FileDialogs.FileSystemInfoWrapper..ctor(FileSystemInfoWrapperFactoryBase factory, FileSystemInfo fileSystemInfo) at Telerik.Windows.Controls.FileDialogs.FileInfoWrapper..ctor(FileSystemInfoWrapperFactoryBase factory, FileInfo info) at Telerik.Windows.Controls.FileDialogs.FileSystemInfoWrapperFactory.TryGetConcreteFileSystemInfoWrapper(FileSystemInfo fileSystemInfo, FileSystemInfoWrapper& fileSystemInfoWrapper) at Telerik.Windows.Controls.FileDialogs.DirectoryInfoWrapper.LoadFiles(DirectoryInfo directoryInfo) at Telerik.Windows.Controls.FileDialogs.DirectoryInfoWrapper.ReloadChildren()
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)); }
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