Exemple #1
0
        internal override void OnCurrentChanged(ICollectionView collectionView, EventArgs args)
        {
            // There are two possible CurrentChanged events that comes through this event handler.
            // 1. CurrentChanged from DataItem as CollectionView
            // 2. CurrentChanged from QueriedCollection

            // only handle changed event from DataItem as CollectionView
            if (collectionView == CollectionView)
            {
                using (ParentBindingExpression.ChangingValue())
                {
                    // This will unhook and hook notifications
                    UpdateContextNode(true);

                    // tell host worker to use a new item
                    _hostWorker.UseNewXmlItem(this.RawValue());
                }
            }
        }