New to Telerik UI for WPF? Download free 30-day trial

Clearing Navigation History in RadFileDialogs Explorer Control

Environment

Product RadFileDialogs for WPF
Version 2024.3.806

Description

How to clear the navigation history of the RadFileDialogs' ExplorerControl.

Solution

To clear the navigation history, you can subscribe to the Loaded event of the RadFileDialog or the ExplorerControl in order to access the HistoryNavigationPaneControl. Then, you can get the DirectoryHistory object and call its Clear method.

 private HistoryNavigationPaneControl historyNavigationPane; 
 
 private void ExplorerControl_Loaded(object sender, RoutedEventArgs e) 
 { 
     this.historyNavigationPane = this.explorerControl.FindChildByType<HistoryNavigationPaneControl>(); 
 } 
 
 public void ClearDirectoryHistory() 
 { 
     this.historyNavigationPane.DirectoryHistory.Clear(); 
 } 
In this article