public override AView OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { base.OnCreateView(inflater, container, savedInstanceState); var context = MauiContext.Context; _outerLayout = PlatformInterop.CreateNavigationBarOuterLayout(context); _navigationArea = PlatformInterop.CreateNavigationBarArea(context, _outerLayout); _bottomView = PlatformInterop.CreateNavigationBar(context, Resource.Attribute.bottomNavigationViewStyle, _outerLayout, this); if (ShellItem == null) { throw new InvalidOperationException("Active Shell Item not set. Have you added any Shell Items to your Shell?"); } if (ShellItem.CurrentItem == null) { throw new InvalidOperationException($"Content not found for active {ShellItem}. Title: {ShellItem.Title}. Route: {ShellItem.Route}."); } HookEvents(ShellItem); SetupMenu(); _appearanceTracker = ShellContext.CreateBottomNavViewAppearanceTracker(ShellItem); _bottomNavigationTracker = new BottomNavigationViewTracker(); ((IShellController)ShellContext.Shell).AddAppearanceObserver(this, ShellItem); return(_outerLayout); }