ShellControlConnectorFolderChanging Event |
Namespace: Jam.Shell
private ItemIdList m_RootItemIdList; //stores the ItemIdList of the allowed folder private void ShellControlConnector1_FolderChanging(object sender, FolderChangingEventArgs e) { if (ItemIdList.IsNullOrInvalid(m_RootItemIdList)) return; //We also want to allow the view, where the search result is presented and also subfolders from the search result. if (e.FolderIdList.IsSearchFolder || e.FolderIdList.IsInSearchFolder) return; //Else, only children of the stored root are allowed (and the root itself). e.Cancel = !(m_RootItemIdList.IsParentOf(e.FolderIdList)); }