public async void LoadChildren(TreeNavigationItem parentTreeNavigationItem) { if (parentTreeNavigationItem == null) { return; } if (parentTreeNavigationItem.HasRemoteChildren) { parentTreeNavigationItem.HasRemoteChildren = false; parentTreeNavigationItem.SetChildren(await DoLoadChildren(parentTreeNavigationItem)); } }
protected virtual void OnCreate(PublishEvent publishEvent) { TreeNavigationItem parentTreeNavigationItem = Find(Roots, publishEvent.ParentObjectId.Value); if (parentTreeNavigationItem == null) { return; } parentTreeNavigationItem.SetChildren(_service.GetChildren(NavigationContext.CreateNavigationContext(), parentTreeNavigationItem)); parentTreeNavigationItem.IsExpanded = true; TreeNavigationItem affectedTreeNavigationItem = Find(Roots, publishEvent.AffectedObjectId); if (affectedTreeNavigationItem != null) { affectedTreeNavigationItem.IsSelected = true; } }
protected override void OnCreate(PublishEvent publishEvent) { TreeNavigationItem parentTreeNavigationItem = Find(Roots, publishEvent.AffectedObjectId); if (parentTreeNavigationItem == null) { return; } parentTreeNavigationItem.SetChildren(_service.GetChildren(MasterNavigationContext.CreateMasterNavigationContext(_masterNavigationItem), parentTreeNavigationItem)); parentTreeNavigationItem.IsExpanded = true; TreeNavigationItem affectedTreeNavigationItem = Find(Roots, publishEvent.AffectedObjectId); if (affectedTreeNavigationItem != null) { affectedTreeNavigationItem.IsSelected = true; } }