private void OnRequestBringIntoView(object sender, RequestBringIntoViewEventArgs e) { if (e.Handled) { return; } var targetCell = ( Cell )sender; Debug.Assert(targetCell != null); Debug.Assert(m_collection.Contains(targetCell)); if ((targetCell != e.TargetObject) && !targetCell.IsAncestorOf(e.TargetObject)) { return; } // Do not process the bring into view for a templated cell. if (VirtualizingCellCollection.IsTemplatedCell(targetCell)) { return; } var targetRow = targetCell.ParentRow; Debug.Assert((targetRow == null) || (targetRow == m_parentRow)); var targetHost = (targetRow != null) ? targetRow.CellsHostPanel as IVirtualizingCellsHost : null; e.Handled = (targetHost != null) && (targetHost.BringIntoView(targetCell, e)); }
private static bool IsRecyclableCell(Cell cell) { return((cell != null) && !VirtualizingCellCollection.IsTemplatedCell(cell)); }