public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            ParentGrid = TreeHelper.FindParent<DynamicGrid>(this);
            ParentGrid.ColumnHeadersPresenter = this;
        }
Пример #2
0
 internal void HookOwner()
 {
     if (_owningGrid == null) {
         DynamicGrid owner = ItemsControl.GetItemsOwner(this) as DynamicGrid;
         if (owner == null) {
             throw new NotSupportedException("hey!");
         }
         _owningGrid = owner;
     }
 }
Пример #3
0
 internal void CleanUp(DynamicGrid owner, object item)
 {
     // when VirtualizationMode == Recycling, next lines must not be called as system calls them
     var mode = VirtualizingPanel.GetVirtualizationMode(ParentGrid);
     if (mode != VirtualizationMode.Recycling) {
         foreach (var cell in _realizedCells) {
             cell.CleanUp();
         }
         _realizedCells.Clear();
     }
 }
Пример #4
0
        internal void Prepare(DynamicGrid owner, object item)
        {
            if (!(item is IList)) {
                throw new NotSupportedException("JointCollectionGridRow supports only IList for item");
            }

            ParentGrid = owner;

            var items = (IList)item;
            ItemsSource = items;
        }