Knowledgebase

status_loader

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.

Need further help getting started?

You did not find what you were looking for? Please contact us so we can provide an answer to your question.

Contact Form