protected override void OnElementChanged(ElementChangedEventArgs <TabbedPage> e) { base.OnElementChanged(e); if (e.OldElement != null) { //cleanup here } if (e.NewElement != null) { CurrentTabbedPage = (HiddenTabbedPage)e.NewElement; } else { CurrentTabbedPage = (HiddenTabbedPage)e.OldElement; } //find the pager and tabs for (int i = 0; i < ChildCount; ++i) { Android.Views.View view = (Android.Views.View)GetChildAt(i); if (view is TabLayout) { TabsLayout = (TabLayout)view; } else if (view is ViewPager) { PagerLayout = (ViewPager)view; } } }
//------------------------------------------------------------- protected override void OnElementChanged(VisualElementChangedEventArgs e) //------------------------------------------------------------- { base.OnElementChanged(e); if (e.OldElement != null) { //release any stuff here } if (e.NewElement != null) { tabbarController = (UITabBarController)this.ViewController; CurrentTabbedPage = (HiddenTabbedPage)e.NewElement; } else { CurrentTabbedPage = (HiddenTabbedPage)e.OldElement; } //the following commented code is not working //as Forms as it just leaves empty white space //instead of hidden tabbedbar: // if (tabbarController != null) // tabbarController.TabBar.Hidden = true; }