/// <summary> /// Creates a new instance of <see cref="FrameSectionsNavigator"/>. /// </summary> /// <param name="multiFrame">The <see cref="MultiFrame"/> hosting the views.</param> /// <param name="globalRegistrations">The dictionary of view model types mapping to their page type.</param> public FrameSectionsNavigator(MultiFrame multiFrame, IReadOnlyDictionary <Type, Type> globalRegistrations) : base(GetDefaultSections(multiFrame, globalRegistrations)) { _multiFrame = multiFrame; _globalRegistrations = globalRegistrations; multiFrame.ModalClosedNatively += OnModalClosedNatively; }
private static IReadOnlyDictionary <string, ISectionStackNavigator> GetDefaultSections(MultiFrame multiFrame, IReadOnlyDictionary <Type, Type> globalRegistrations) { return(multiFrame.SectionsFrameNames.ToDictionary <string, string, ISectionStackNavigator>( keySelector: n => n, elementSelector: n => new SectionStackNavigator(new FrameStackNavigator(multiFrame.GetSectionFrame(n), globalRegistrations), n, isModal: false, priority: 0) )); }