public IView GetView(Type viewModelType) { if (!typeof(IViewModel).GetTypeInfo().IsAssignableFrom(viewModelType)) { throw new ArgumentException(nameof(viewModelType)); } var viewType = _viewLocator.FindViewType(viewModelType); return(null); }
public void RemoveFromNavigationStack <T>(bool removeFirstOccurenceOnly = true) where T : IViewModel { Type pageType = _viewLocator.FindViewType(typeof(T)); var navigationStack = Navigation.NavigationStack.Reverse(); foreach (var page in navigationStack) { if (page.GetType() == pageType) { Navigation.RemovePage(page); if (removeFirstOccurenceOnly) { break; } } } }