public void LoadParentMaps(List<INode> maps, Guid mapId) { var viewModelMaps = new List<SuperGraph.ViewModel.Node>(); foreach (var map in maps) { if (viewModelMaps.All(q => q.Proxy.Id != map.Id)) { var viewModelNode = new SuperGraph.ViewModel.Node(MapManager); viewModelNode.LoadNode(null, map); viewModelMaps.Add(viewModelNode); } } if (viewModelMaps.Count > 1) { var breadcrumb = new MultiBreadcrumbItem(viewModelMaps); if (mapId != Guid.Empty) { var currentMap = breadcrumb.Items.FirstOrDefault(q => q.Node.Proxy.Id == mapId); if (currentMap != null) { breadcrumb.SelectedBreadcrumb = currentMap; } } Breadcrumbs.BreadcrumbTrail.Insert(breadcrumb, _parentIndex); } else if (viewModelMaps.Count == 1) { var breadcrumb = new BreadcrumbItem(viewModelMaps[0]); Breadcrumbs.BreadcrumbTrail.Insert(breadcrumb, _parentIndex); } }
private void RaiseBreadcrumbChangedEvent(MultiBreadcrumbItem breadcrumb, IBreadcrumbItem item) { breadcrumb.SelectedBreadcrumb = item; BreadcrumbChanged(this, new BreadcrumbChangedEventArgs { NewItem = breadcrumb.SelectedBreadcrumb }); }