Esempio n. 1
0
 protected VirtualizableItemBase(double width, Thickness margin, Thickness viewMargin)
 {
     this._width      = width;
     this.Margin      = margin;
     this.ViewMargin  = viewMargin;
     this._view.Width = this.Width;
     VirtualizableItemBase.UpdateInstanceCount(true);
     this.VirtualizableChildren.CollectionChanged += new NotifyCollectionChangedEventHandler(this.VirtualizableChildren_OnCollectionChanged);
 }
Esempio n. 2
0
        private void VirtualizableChildren_OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            if (e.NewItems == null || e.NewItems.Count <= 0)
            {
                return;
            }
            VirtualizableItemBase virtualizableItemBase = e.NewItems[0] as VirtualizableItemBase;

            if (virtualizableItemBase == null)
            {
                return;
            }
            virtualizableItemBase.ParentItem = this;
        }
Esempio n. 3
0
 protected VirtualizableItemBase(double width)
 {
     this._width = width;
     VirtualizableItemBase.UpdateInstanceCount(true);
 }