private async void NavigateToDetail(DataMapSelected e) { HidePopover(); var compositeDataMap = await ExpandCompositeDataMap(e.DataMap); // TODO: make less brittle var subNavigationController = ChildViewControllers[0].ChildViewControllers[0].NavigationController; // Let's fade the detail page when // a new item is selected. RegisterTransitionFadeAnimation(subNavigationController); // How about a brand-new detail controller // to display the selected data map? var detailController = Storyboard.InstantiateViewController <DetailController>(); detailController.Construct(compositeDataMap, e.IsNew); subNavigationController.SetViewControllers(new UIViewController[] { detailController }, false); // We need to dispose the previous active // controller and set this one as the new one. ReplaceActiveDetailController(detailController); }
private void OnDataMapSelected(DataMapSelected e) { InvokeOnMainThread(() => NavigateToDetail(e)); }