OnCollectionViewTypeChanged() защищенный Метод

protected OnCollectionViewTypeChanged ( Type oldCollectionViewType, Type newCollectionViewType ) : void
oldCollectionViewType Type
newCollectionViewType Type
Результат void
Пример #1
0
        private static void OnCollectionViewTypeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CollectionViewSource ctrl = (CollectionViewSource)d;

            Type oldCollectionViewType = (Type)e.OldValue;
            Type newCollectionViewType = (Type)e.NewValue;

            if (!ctrl._isInitializing)
            {
                throw new InvalidOperationException(SR.Get(SRID.CollectionViewTypeIsInitOnly));
            }

            ctrl.OnCollectionViewTypeChanged(oldCollectionViewType, newCollectionViewType);
            ctrl.EnsureView();
        }