public void NavigateToPageForItem(PortalItemViewModel itemVM) { ContentFrame.BackStack.Clear(); Item item = itemVM.Item; if (item is LocalItem localItem) { switch (localItem.Type) { case LocalItemType.MobileMapPackage: ContentFrame.Navigate(typeof(MapPage)); break; default: ContentFrame.Navigate(typeof(GenericItemPage)); break; } } else if (item is PortalItem portalItem) { switch (portalItem.Type) { case PortalItemType.WebMap: if (portalItem.TypeKeywords.Contains("Offline")) { ContentFrame.Navigate(typeof(OfflineMapPage)); } else { ContentFrame.Navigate(typeof(MapPage)); } break; case PortalItemType.WebScene: ContentFrame.Navigate(typeof(ScenePage)); break; default: ContentFrame.Navigate(typeof(GenericItemPage), new SuppressNavigationTransitionInfo()); break; } } }
public void NavigateToPageForItem(PortalItemViewModel item) { throw new InvalidOperationException("Can't navigate to item - not logged in."); }