Пример #1
0
        private void UpdateSelectedNavigationItems()
        {
            var viewModel = inlineNavigationService.GetNavigatedViewModel();

            if (viewModel == null)
            {
                return;
            }
            bool somethingSelected = false;

            foreach (var item in NepApp.UI.NavigationItems)
            {
                item.IsSelected = item.NavigationViewModelType == viewModel.GetType();
                if (item.IsSelected)
                {
                    NavView.SelectedItem = item;
                    somethingSelected    = true;
                }
            }

            if (!somethingSelected)
            {
                NavView.SelectedItem = null;
            }
        }