-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2945 from telerik/new-kb-kb-filedialogs-clear-nav…
…igation-history-afe1687263ea4ae8996d33646a8f9e76 Added new kb article kb-filedialogs-clear-navigation-history
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<HistoryNavigationPaneControl>(); | ||
} | ||
|
||
public void ClearDirectoryHistory() | ||
{ | ||
this.historyNavigationPane.DirectoryHistory.Clear(); | ||
} | ||
{{endregion}} |