Example #1
0
        /// <summary>Releases all used resources and deregisters all events on the items and the underlying collection. </summary>
        public void Dispose()
        {
            TrackCollectionChanges = false;
            TrackItemChanges       = false;

            _internalCollection = null;
            Items = null;
        }
Example #2
0
        private void UpdateTopItems()
        {
            if (_updateLock)
            {
                return;
            }

            var collection = TopItemsCount == -1 ? this : this.Take(TopItemsCount);

            if (TopItems == null)
            {
                TopItems = new MtObservableCollection <T>(collection);
            }
            else
            {
                TopItems.Initialize(collection);
            }
        }