private void InitializeCore(NodePool <T, K> pool, MeasureContext previousContext) { this.Index = pool.layout.IndexFromPhysicalOffset(this.Offset + previousContext.GeneratedLength); this.FirstVisibleIndex = Math.Max(previousContext.LastVisibleIndex - 1, Math.Min(pool.layout.VisibleLineCount, (int)this.Index)); this.LastVisibleIndex = this.FirstVisibleIndex; this.MaxLength = previousContext.MaxLength; this.ForwardGeneratedLength = previousContext.ForwardGeneratedLength; this.BackwardGeneratedLength = previousContext.BackwardGeneratedLength; }
public void InitializeForVerticalMeasure(NodePool <T, K> pool, RadSize size) { this.AvailableLength = Math.Floor(GridModel.DoubleArithmetics.Ceiling(size.Height)); this.InitializeCore(pool); }
private void InitializeCore(NodePool <T, K> pool) { this.Index = pool.layout.IndexFromPhysicalOffset(this.Offset); this.FirstVisibleIndex = Math.Max(0, Math.Min(pool.layout.VisibleLineCount, (int)this.Index)); this.LastVisibleIndex = this.FirstVisibleIndex; }
public void InitializeForHorizontalMeasure(NodePool <T, K> pool, RadSize size) { this.AvailableLength = Math.Floor(GridModel.DoubleArithmetics.Ceiling(size.Width)); this.isHorizontal = true; this.InitializeCore(pool); }