Пример #1
0
        private void SetMenuItemStatus(MenuItemType type, bool enabled)
        {
            MenuItem rideItem = MenuItems.FirstOrDefault(m => m.MenuItemType == type);

            if (rideItem != null)
            {
                rideItem.IsEnabled = enabled;
            }
        }
Пример #2
0
        private async void OnSelectItem(MenuItem item)
        {
            if (item.IsEnabled)
            {
                object parameter = null;

                if (item.MenuItemType == MenuItemType.UpcomingRide)
                {
                    parameter = new BookingViewModel.BookingViewModelNavigationParameter
                    {
                        ShowThanks = false,
                        BookingId  = Settings.CurrentBookingId
                    };
                }

                await NavigationService.NavigateToAsync(item.ViewModelType, parameter);
            }
        }