protected virtual void SetupMenu(IMenu menu, int maxBottomItems, ShellItem shellItem) { var currentIndex = ((IShellItemController)ShellItem).GetItems().IndexOf(ShellSection); var items = CreateTabList(shellItem); BottomNavigationViewUtils.SetupMenu( menu, maxBottomItems, items, currentIndex, _bottomView, ShellItem.FindMauiContext()); UpdateTabBarVisibility(); }
protected virtual bool OnItemSelected(IMenuItem item) { var id = item.ItemId; if (id == MoreTabId) { var items = CreateTabList(ShellItem); _bottomSheetDialog = BottomNavigationViewUtils.CreateMoreBottomSheet(OnMoreItemSelected, ShellItem.FindMauiContext(), items, _bottomView.MaxItemCount); _bottomSheetDialog.Show(); _bottomSheetDialog.DismissEvent += OnMoreSheetDismissed; } else { var shellSection = ((IShellItemController)ShellItem).GetItems()[id]; if (item.IsChecked) { OnTabReselected(shellSection); } else { return(ChangeSection(shellSection)); } } return(true); }