public void Navigate(IRegistredView registredView, IRegion region = null) { var requestedRegion = registredView.Region; if (region != null) { requestedRegion = region; registredView.Region = region; } if (NavigationItems.TryGetValue(requestedRegion, out var navigationItems)) { if (navigationItems.Actual.Value != registredView) { navigationItems.Actual.Value.DeactivateDataContext(); navigationItems.Add(registredView); } else { return; } } else { var list = new NavigationSet(); list.Add(registredView); NavigationItems.Add(registredView.Region, list); } registredView.Activate(); }
public IRegistredView GetPrevious(IRegistredView registredView) { if (NavigationItems.TryGetValue(registredView.Region, out var navigationItems)) { return(navigationItems.GetPrevious()); } return(null); }
public void Add(IRegistredView registredView) { if (isInBackState) { RemoveAllNodesAfter(Actual); isInBackState = false; } Chain.AddLast(registredView); Actual = Chain.Last; }