FAQ & Knowledge Base

Welcome to our Knowledge Base. Search or browse through the topics below to find answers to your questions.

Categories: ShellBrowser .NET Components | Show all categories

Using BeforeSelect to make the Path of Components unchangeable

Question / Problem

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

Answer / Solution

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.