Skip to content

Commit d88909c

Browse files
Merge pull request #2945 from telerik/new-kb-kb-filedialogs-clear-navigation-history-afe1687263ea4ae8996d33646a8f9e76
Added new kb article kb-filedialogs-clear-navigation-history
2 parents 9cf3797 + b81a4d4 commit d88909c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Clearing Navigation History in RadFileDialogs Explorer Control
3+
description: Learn how to manipulate or clear the navigation history of the Explorer Control in RadFileDialogs for WPF.
4+
type: how-to
5+
page_title: How to Clear the Navigation History in RadFileDialogs Explorer Control
6+
slug: kb-filedialogs-clear-navigation-history
7+
tags: radfiledialogs, wpf, explorer control, navigation history, clear history
8+
res_type: kb
9+
ticketid: 1632150
10+
---
11+
12+
## Environment
13+
14+
| Product | RadFileDialogs for WPF |
15+
| --- | --- |
16+
| Version | 2024.3.806 |
17+
18+
## Description
19+
20+
How to clear the navigation history of the RadFileDialogs' ExplorerControl.
21+
22+
## Solution
23+
24+
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.
25+
26+
#### __[C#]__
27+
{{region kb-filedialogs-clear-navigation-history-0}}
28+
private HistoryNavigationPaneControl historyNavigationPane;
29+
30+
private void ExplorerControl_Loaded(object sender, RoutedEventArgs e)
31+
{
32+
this.historyNavigationPane = this.explorerControl.FindChildByType<HistoryNavigationPaneControl>();
33+
}
34+
35+
public void ClearDirectoryHistory()
36+
{
37+
this.historyNavigationPane.DirectoryHistory.Clear();
38+
}
39+
{{endregion}}

0 commit comments

Comments
 (0)