4 Answers, 1 is accepted
Hi Patrick,
This behavior is already logged in our Feedback Portal, where you can track its progress and vote for its implementation.
As a workaround: What you could try is to subscribe to the PreviewKeyDown event of the RadSaveFileDialog (or any other file dialog). In the event handler, you can check the current press key combination and execute the HistoryNavigationCommands.Back/Forward command. The tricky part here is that the HistoryNavigationPaneControl control (which holds the move back, move forward, etc. buttons) needs to be focused first. Check the following code snippet.
private void ShowSaveFileDialog()
{
RadSaveFileDialog saveFileDialog = new RadSaveFileDialog();
saveFileDialog.PreviewKeyDown += RadOpenFileDialog_PreviewKeyDown;
saveFileDialog.ShowDialog();
if (saveFileDialog.DialogResult == true)
{
Stream fileStream = saveFileDialog.OpenFile();
}
}
private void RadOpenFileDialog_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (Keyboard.IsKeyDown(Key.LeftAlt) && e.SystemKey == Key.Left)
{
IInputElement focusedControl = Keyboard.FocusedElement;
RadSaveFileDialog radOpenFileDialog = sender as RadSaveFileDialog;
HistoryNavigationPaneControl historyNavigationPaneControl = radOpenFileDialog.ChildrenOfType<HistoryNavigationPaneControl>().FirstOrDefault();
historyNavigationPaneControl.Focus();
HistoryNavigationCommands.Back.Execute(null);
focusedControl.Focus();
}
else if(Keyboard.IsKeyDown(Key.LeftAlt) && e.SystemKey == Key.Right)
{
IInputElement focusedControl = Keyboard.FocusedElement;
RadSaveFileDialog radSaveFileDialog = sender as RadSaveFileDialog;
HistoryNavigationPaneControl historyNavigationPaneControl = radSaveFileDialog.ChildrenOfType<HistoryNavigationPaneControl>().FirstOrDefault();
historyNavigationPaneControl.Focus();
HistoryNavigationCommands.Forward.Execute(null);
focusedControl.Focus();
}
}
Regards,
Dinko
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.

Hi Dinko,
I will try later and give you more information. The problem is that I need to implement this 3 times, as there are three dialogs.
Hello Patrick,
The RadOpenFolderDialog, RadOpenFileDialog and RadSaveFileDialog derives from DialogWindowBase. You can use that to make the custom code general for the three dialogs.
private void RadOpenFileDialog_PreviewKeyDown(object sender, KeyEventArgs e)
{
var dialog = sender as DialogWindowBase;
if (Keyboard.IsKeyDown(Key.LeftAlt) && e.SystemKey == Key.Left)
{
IInputElement focusedControl = Keyboard.FocusedElement;
HistoryNavigationPaneControl historyNavigationPaneControl = dialog.ChildrenOfType<HistoryNavigationPaneControl>().FirstOrDefault();
historyNavigationPaneControl.Focus();
HistoryNavigationCommands.Back.Execute(null);
focusedControl.Focus();
}
else if (Keyboard.IsKeyDown(Key.LeftAlt) && e.SystemKey == Key.Right)
{
IInputElement focusedControl = Keyboard.FocusedElement;
HistoryNavigationPaneControl historyNavigationPaneControl = dialog.ChildrenOfType<HistoryNavigationPaneControl>().FirstOrDefault();
historyNavigationPaneControl.Focus();
HistoryNavigationCommands.Forward.Execute(null);
focusedControl.Focus();
}
}
Regards,
Dinko
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.

Hi Dinko,
It works, but I really think that it must work "out-of-the-box", without these kind of patches.