Hello.
I've created buttons that are bound to FileDialogCommands for sending commands to an ExplorerControl, as shown here:
https://docs.telerik.com/devtools/wpf/controls/radfiledialogs/features/commands
Everything works when the ExplorerControl is visible. However, if the ExplorerControl's Visibility is set to Collapsed (which I need based on a condition), the Command bindings on the buttons throw the below error:
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Windows.Controls.FileDialogs.ExplorerControl.CanExecuteHelper(Object sender)
The UserControl that hosts the ExplorerControl is being imported through MEF. I don't know if that's a factor.
Either way, it looks like a null check might be needed for the InternalViewModel property.
This is reproducible only with display language of the Windows set to a language different than English. It was originally reproduced with French.
If you set the initial directory to a network dir (ex: \\MyPcName\SharedFolder2\MyFiles), and open the dialog, initially the correct folder is loaded. However, if you wait several seconds without doing anything, the currently opened directory automatically changes to the root "Network" dir.
To reproduce this behavior you need the following settings.
- Set the display language of your Windows to Italian.
- Use a RadOpenFileDialog.
- Set its Filter. For example, you can filter to show only Excel files.
- Change the layout type to Details.
In this case the folders in the opened direction disappears.
For example Filter is "XAML CS Files (*.xaml.cs)|*.xaml.cs" MS Win32 OpenFileDialog filter files correctly to show only xaml.cs files. RadOpenFile/SaveFileDialog does not show the xaml.cs files which is wrong.
ExplorerControl is in DropDownContent of DropDownButton. Selecting multiple files in the explorer is not possible.
<telerik:RadDropDownButton DropDownWidth="400" DropDownHeight="400" VerticalAlignment="Center" Content="Dialog Button"> <telerik:RadDropDownButton.DropDownContent> <dialogs:ExplorerControl Layout="Details"/> </telerik:RadDropDownButton.DropDownContent> </telerik:RadDropDownButton> When the DropDown is opened Exception in FileBrowserGridView.cs is thrown.
ExplorerControl or FileDialog is opened with StyleManager.ApplicationTheme = new Windows8TouchTheme(); On load exception is thrown: "Cannot find resource named 'BreadCrumbBarItemCustomStyle'. Resource names are case sensitive"
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.
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.
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.
If extension filter contains *.TXT but the file is named File1.txt, it is filtered in the main pane of the File/FolderDialogs. It shouldn't be filtered, jut like it is in MS Win 32 File dialogs.
Open/Save File/Folder dialog with implicit styles. Change a theme dynamically by merging resource dictionary containing the styles for Office2016/ Office2016Touch / Fluent Theme. Show the dialog and open the details grid (view). XamlParseException occurs - cannot find the resource "GridViewValidationToolTipTemplate"
SaveFileDialog does not open overwrite confirmation message box if the file name is typed with the default extension at the end. For example, you have "empty.txt" file on the desktop. You open SaveFileDialog, type empty, select TXT extension on the filters list on the bottom. Remove the .txt from the file name (if it is there) and press Save. Expected: Confirmation window for overwriting the file should be opened. Actual: No confirmation window opens.