Unplanned
Last Updated: 16 Oct 2025 14:27 by Stenly
Stenly
Created on: 16 Oct 2025 14:27
Category: FileDialogs
Type: Feature Request
1
FileDialogs: Add full support for folder shortcuts across the provided file dialog types

Currently, the RadFileDialogs components show folder shortcuts, however, they are not fully supported. More specifically, interacting with them, such as mouse-double click, does not navigate to the respective folder.

In the meantime, this behavior can be achieved by subscribing to the Loaded event of the used file dialog type, in order to retrieve and cache the ExplorerControl in a field or a property. Then, you could subscribe to the PreviewMouseDoubleClick event of the used file dialog type and check whether the DataContext of the e.OriginalSource property is of the type of FileInfoWrapper. If it is and its IsShortcut property is true, set the CurrentDirectoryPath property of the cached ExplorerControl to the ShortcutLocation property of the FileInfoWrapper object.

The following code snippets showcase this approach when using the RadSaveFileDialog type:

//Caching the ExplorerControl instance
private ExplorerControl explorerControl;

//Retrieving the ExplorerControl instance
private void SaveFileDialog_Loaded(object sender, RoutedEventArgs e)
{
    RadSaveFileDialog radSaveFileDialog = (RadSaveFileDialog)sender;

    ExplorerControl explorerControl = radSaveFileDialog.ChildrenOfType<ExplorerControl>().FirstOrDefault();

    if (explorerControl != null)
    {
        this.explorerControl = explorerControl;
    }
}
//Navigation logic on double click of a shortcut
private void SaveFileDialog_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
    FrameworkElement frameworkElement = e.OriginalSource as FrameworkElement;

    if (frameworkElement != null)
    {
        FileInfoWrapper fileInfoWrapper = frameworkElement.DataContext as FileInfoWrapper;

        if (fileInfoWrapper != null)
        {
            if (fileInfoWrapper.IsShortcut)
            {
                RadSaveFileDialog radSaveFileDialog = (RadSaveFileDialog)sender;

                this.explorerControl.CurrentDirectoryPath = fileInfoWrapper.ShortcutLocation;

                e.Handled = true;
            }
        }
    }
}

 

0 comments