private void HierarchyNavigator_HierarchyNavigatorSelectedItemChanged(object sender, Syncfusion.Windows.Tools.Controls.HierarchyNavigatorSelectedItemChangedEventArgs e) {
if ((sender as HierarchyItem).ContentString == @"C:\Test")
(sender as HierarchyItem).HierarchyItems.Add(new HierarchyItem("Item3") { ContentString = @"Test Folders" }); } |
private void HierarchyNavigator2_HierarchyNavigatorSelectedItemChanged(object sender, Syncfusion.Windows.Tools.Controls.HierarchyNavigatorSelectedItemChangedEventArgs e) {
if (hierarchyNavigator2.SelectedItem == null) return;
HierarchyItem selItm = hierarchyNavigator2.SelectedItem as HierarchyItem;
string[] dirs = Directory.GetDirectories(selItm.ContentString, "*", SearchOption.TopDirectoryOnly);
foreach (string dir in dirs)
{
selItm.HierarchyItems.Add(new HierarchyItem(dir));
} } |