コード例 #1
0
ファイル: FixedCellSubPanel.cs プロジェクト: Drift2020/WPF
        protected IEnumerable <Cell> GetVisibleCells()
        {
            VirtualizingCellCollection collection = this.ParentPanel.ParentRowCells;

            if (collection == null)
            {
                yield break;
            }

            foreach (string fieldName in this.GetVisibleFieldsName())
            {
                yield return(collection.GetCell(fieldName, false));
            }
        }
コード例 #2
0
        private IEnumerable <Cell> GetCellsToLayout(IEnumerable <Cell> visibleCells, IEnumerable <string> permanentScrollingFieldNames, VirtualizingCellCollection cellsCollection)
        {
            List <string> unhandledCells = permanentScrollingFieldNames.ToList();

            foreach (var cell in visibleCells)
            {
                unhandledCells.Remove(cell.FieldName);

                yield return(cell);
            }

            foreach (var fieldName in unhandledCells)
            {
                var cell = cellsCollection.GetCell(fieldName, false);
                Debug.Assert(cell != null);

                yield return(cell);
            }
        }
    private IEnumerable<Cell> GetCellsToLayout( IEnumerable<Cell> visibleCells, IEnumerable<string> permanentScrollingFieldNames, VirtualizingCellCollection cellsCollection )
    {
      List<string> unhandledCells = permanentScrollingFieldNames.ToList();

      foreach( var cell in visibleCells )
      {
        unhandledCells.Remove( cell.FieldName );

        yield return cell;
      }

      foreach( var fieldName in unhandledCells )
      {
        var cell = cellsCollection.GetCell( fieldName, false );
        Debug.Assert( cell != null );

        yield return cell;
      }
    }