Ejemplo n.º 1
0
        void OnItemsChanged(ModelItemCollection oldItemsCollection, ModelItemCollection newItemsCollection)
        {
            if (oldItemsCollection != null)
            {
                oldItemsCollection.CollectionChanged -= this.OnCollectionChanged;
            }

            if (newItemsCollection != null)
            {
                newItemsCollection.CollectionChanged += this.OnCollectionChanged;
            }

            if (!isRegisteredWithParent)
            {
                CutCopyPasteHelper.RegisterWithParentViewElement(this);
                isRegisteredWithParent = true;
            }
            populateOnLoad = false;
            PopulateContent();
        }
Ejemplo n.º 2
0
 protected override void OnRender(DrawingContext drawingContext)
 {
     CutCopyPasteHelper.RegisterWithParentViewElement(this);
     base.OnRender(drawingContext);
 }