public void ShowModelStructure(object sender, EventArgs e) { try { IModel model = explorerPresenter.CurrentNode; if (model != null) { foreach (IModel child in model.FindAllDescendants()) { child.IsHidden = !child.IsHidden; } foreach (IModel child in model.Children) { if (child.IsHidden) { explorerPresenter.Tree.Delete(child.FullPath); } } explorerPresenter.PopulateContextMenu(model.FullPath); explorerPresenter.RefreshNode(model); } } catch (Exception err) { explorerPresenter.MainPresenter.ShowError(err); } }