Inheritance: FirstFloor.ModernUI.BetterListCollectionView
Esempio n. 1
0
        private void OnItemsSourceChanged(IAcObjectList newValue) {
            ClearFilter();

            if (InnerItemsSource != null) {
                InnerItemsSource.CurrentChanged -= ItemsSource_CurrentChanged;
            }
            
            _observableCollection = newValue;
            if (newValue == null) return;

            InnerItemsSource = new AcWrapperCollectionView(_observableCollection) { CustomSort = this };
            InnerItemsSource.CurrentChanged += ItemsSource_CurrentChanged;
            UpdateFilter();
        }
Esempio n. 2
0
 public ViewModel() {
     List = new AcWrapperCollectionView(SpecialEventsManager.Instance.WrappersAsIList);
     List.CurrentChanged += OnCurrentChanged;
     List.MoveCurrentToIdOrFirst(ValuesStorage.GetString(KeySelectedId));
     List.CustomSort = this;
 }
Esempio n. 3
0
        private void OnItemsSourceChanged(AcWrapperCollectionView oldValue, AcWrapperCollectionView newValue) {
            if (oldValue != null) {
                oldValue.CurrentChanged -= ItemsSource_CurrentChanged;
            }

            if (newValue != null) {
                newValue.CurrentChanged += ItemsSource_CurrentChanged;
                _selectedWrapper.Value = newValue.CurrentItem as AcItemWrapper;
            }
        }