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()
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
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)); }
Currently RadFileDialogs do not provide such tooltips when hovering files and folders. Check the attached image for clarification.
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.
Using RadOpenFileDialog reports a lot of binding errors. #26 seems to happen all the time, whereas #40 is related to the length of the initial directory.
The dialog is working, but those errors are really disturbing. The more false binding errors we get, the higher the possibility is that we miss real errors. Suppressing them by setting the error level to Critical is not a solution, as it will suppress real errors as well.
System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='RadWatermarkTextBox'
System.Windows.Data Warning: 40 : BindingExpression path error: 'IsHidden' property not found on 'object' ''OpenFileDialogViewModel' (HashCode=39129256)'. BindingExpression:Path=IsHidden; DataItem='OpenFileDialogViewModel' (HashCode=39129256); target element is 'RadBreadcrumbBarItem' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Warning: 40 : BindingExpression path error: 'IsSystemHiddenActual' property not found on 'object' ''OpenFileDialogViewModel' (HashCode=39129256)'. BindingExpression:Path=IsSystemHiddenActual; DataItem='OpenFileDialogViewModel' (HashCode=39129256); target element is 'RadBreadcrumbBarItem' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Warning: 40 : BindingExpression path error: 'IsHidden' property not found on 'object' ''OpenFileDialogViewModel' (HashCode=39129256)'. BindingExpression:Path=IsHidden; DataItem='OpenFileDialogViewModel' (HashCode=39129256); target element is 'RadBreadcrumbBarItem' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Warning: 40 : BindingExpression path error: 'IsSystemHiddenActual' property not found on 'object' ''OpenFileDialogViewModel' (HashCode=39129256)'. BindingExpression:Path=IsSystemHiddenActual; DataItem='OpenFileDialogViewModel' (HashCode=39129256); target element is 'RadBreadcrumbBarItem' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='RadBreadcrumbBarItem'