FAQ & Knowledge Base

Herzlich Willkommen in unserer Wissensdatenbank. Nutzen Sie die Suchfunktion oder durchstöbern Sie unsere Kategorien, um Antworten auf Ihre Fragen zu erhalten.

Kategorien: ShellBrowser .NET Components | Alle Kategorien anzeigen

Die folgenden Inhalte sind leider nicht auf Deutsch verfügbar.

Using BeforeSelect to make the Path of Components unchangeable

Frage / Problem

How can I prevent the selected path to be changed by the user?

Antwort / Lösung

If you have several controls connected using a ShellControlConnector, you can use the FolderChanging event to control the folders that can be navigated.

For single controls, you might either attach a ShellControlConnector, too, or specifially use one of the following ways:

For the ShellListView you can use BeforeInvokeCommand or PathChanged.

For the ShellTreeView you can restrict the visible nodes, by adding custom root nodes and/or restrict the possibility to expand nodes via the BeforeExpand event. Also the selection can be cancelled via the "BeforeSelect" event.

For the ShellAddressBar you restrict the reachable paths by setting the root node. Use the "BeforePathChange" event to limit access to other paths.