diff --git a/knowledge-base/kb-filedialogs-clear-navigation-history.md b/knowledge-base/kb-filedialogs-clear-navigation-history.md new file mode 100644 index 000000000..5910ec572 --- /dev/null +++ b/knowledge-base/kb-filedialogs-clear-navigation-history.md @@ -0,0 +1,39 @@ +--- +title: Clearing Navigation History in RadFileDialogs Explorer Control +description: Learn how to manipulate or clear the navigation history of the Explorer Control in RadFileDialogs for WPF. +type: how-to +page_title: How to Clear the Navigation History in RadFileDialogs Explorer Control +slug: kb-filedialogs-clear-navigation-history +tags: radfiledialogs, wpf, explorer control, navigation history, clear history +res_type: kb +ticketid: 1632150 +--- + +## 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. + +#### __[C#]__ +{{region kb-filedialogs-clear-navigation-history-0}} + private HistoryNavigationPaneControl historyNavigationPane; + + private void ExplorerControl_Loaded(object sender, RoutedEventArgs e) + { + this.historyNavigationPane = this.explorerControl.FindChildByType(); + } + + public void ClearDirectoryHistory() + { + this.historyNavigationPane.DirectoryHistory.Clear(); + } +{{endregion}}