Microsoft.Windows.Controls.Ribbon.RibbonGalleryCategory.OnItemsSourceChanged C# (CSharp) Method

OnItemsSourceChanged() protected method

protected OnItemsSourceChanged ( IEnumerable oldValue, IEnumerable newValue ) : void
oldValue IEnumerable
newValue IEnumerable
return void
        protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
        {
            base.OnItemsSourceChanged(oldValue, newValue);
            RemoveCurrentItemChangedListener();
            AddCurrentItemChangedListener();

            // Note that it is possible that we haven't had a chance to sync
            // to the CurrentItem on the CollectionView yet. This could happen,
            // if the ItemContainers were generated synchronously and the base
            // implementation fired ItemContainerGeneratorStatusChanged before
            // we got here. So this is one more attempt to keep things in sync.

            SynchronizeWithCurrentItem();
        }