Exemplo n.º 1
0
            internal Enumerator(BitmapEffectCollection list)
            {
                Debug.Assert(list != null, "list may not be null.");

                _list    = list;
                _version = list._version;
                _index   = -1;
                _current = default(BitmapEffect);
            }
Exemplo n.º 2
0
        /// <summary>
        /// Implementation of Freezable.GetCurrentValueAsFrozenCore()
        /// </summary>
        protected override void GetCurrentValueAsFrozenCore(Freezable source)
        {
            BitmapEffectCollection sourceBitmapEffectCollection = (BitmapEffectCollection)source;

            base.GetCurrentValueAsFrozenCore(source);

            int count = sourceBitmapEffectCollection._collection.Count;

            _collection = new FrugalStructList <BitmapEffect>(count);

            for (int i = 0; i < count; i++)
            {
                BitmapEffect newValue = (BitmapEffect)sourceBitmapEffectCollection._collection[i].GetCurrentValueAsFrozen();
                OnFreezablePropertyChanged(/* oldValue = */ null, newValue);
                _collection.Add(newValue);
            }
        }