protected virtual void SetupLoadChildrensWorker() { LoadChildrensWorker.DoWork += (sender, args) => { IsLoading = true; var results = EmbeddedHierarchyEntry.GetChildren(EmbeddedHierarchyEntry.Item); args.Result = results; }; LoadChildrensWorker.RunWorkerCompleted += (sender, args) => { var results = args.Result as IEnumerable <object>; foreach (var child in results) { var childModel = CreateChildrenModel(child); if (childModel != null) { ChildrenModels.Add(childModel); } } IsLoading = false; IsLoaded = true; }; }
public VirtualFolderTreeItemViewModel(HierarchyViewModelBase parent, IHierarchy embeddedFolderEntry) : base(parent, embeddedFolderEntry) { ChildrenModels.Add(DummyNode); }