示例#1
0
        private void OnTabsNavigated(object sender, NavigationEventArgs e)
        {
            if (_list != null)
            {
                _list.PropertyChanged -= OnListPropertyChanged;
            }

            if (_choosing != null)
            {
                _choosing.ItemChosen -= OnItemChosen;
            }

            var content = ((ModernTab)sender).Frame.Content;

            _list     = content as ISelectedItemPage <AcObjectNew>;
            _choosing = content as IChoosingItemControl <AcObjectNew>;

            if (_list != null)
            {
                _list.SelectedItem     = Model.SelectedTrackConfiguration?.MainTrackObject;
                _list.PropertyChanged += OnListPropertyChanged;
            }

            if (_choosing != null)
            {
                _choosing.ItemChosen += OnItemChosen;
            }

            if (content is AcObjectSelectList)
            {
                UpdateHint();
            }
        }
示例#2
0
        private void OnTabsNavigated(object sender, NavigationEventArgs e)
        {
            if (_list != null)
            {
                _list.PropertyChanged -= List_PropertyChanged;
            }

            if (_choosing != null)
            {
                _choosing.ItemChosen -= Choosing_ItemChosen;
            }

            var content = ((ModernTab)sender).Frame.Content;

            _list     = content as ISelectedItemPage <AcObjectNew>;
            _choosing = content as IChoosingItemControl <AcObjectNew>;

            if (_list != null)
            {
                _list.SelectedItem     = SelectedCar;
                _list.PropertyChanged += List_PropertyChanged;
            }

            if (_choosing != null)
            {
                _choosing.ItemChosen += Choosing_ItemChosen;
            }
        }
示例#3
0
        private void Tabs_OnNavigated(object sender, NavigationEventArgs e) {
            if (_list != null) {
                _list.PropertyChanged -= List_PropertyChanged;
            }

            if (_choosing != null) {
                _choosing.ItemChosen -= Choosing_ItemChosen;
            }

            var content = ((ModernTab)sender).Frame.Content;
            _list = content as ISelectedItemPage<AcObjectNew>;
            _choosing = content as IChoosingItemControl<AcObjectNew>;

            if (_list != null) {
                _list.SelectedItem = Model.SelectedTrackConfiguration?.MainTrackObject;
                _list.PropertyChanged += List_PropertyChanged;
            }

            if (_choosing != null) {
                _choosing.ItemChosen += Choosing_ItemChosen;
            }
        }