Пример #1
0
        /// <summary>
        /// For performance reasons, we don't call EhSelfChanged during the suspended state. Instead, when we resume here, we compare the saved state of this instance with the current state of the instance
        /// and and set our accumulated data accordingly.
        /// </summary>
        protected override void OnResume()
        {
            BoundariesChangedData data = 0;

            // if anything changed in the meantime, fire the event
            if (!EnumerableExtensions.AreStructurallyEqual(_savedItems, _itemList))
            {
                data |= BoundariesChangedData.ComplexChange;
            }

            if (0 != data)
            {
                _accumulatedEventData = new BoundariesChangedEventArgs(data);
            }

            _savedItems = null;
            base.OnResume();
        }