Added CanExpandGetter logic (optional)

This commit is contained in:
tznind
2020-11-23 11:57:12 +00:00
parent 4047154eec
commit c147f79e28
2 changed files with 30 additions and 1 deletions

View File

@@ -54,6 +54,9 @@ namespace UICatalog.Scenarios {
return;
}
// As a shortcut to enumerating half the file system, tell tree that all directories are expandable (even if they turn out to be empty later on)
_treeView.CanExpandGetter = (o)=>o is DirectoryInfo;
// Determines how to compute children of any given branch
_treeView.ChildrenGetter = GetChildren;