private Point CalculateCellOffset(ColumnBase column, IColumnInfoCollection <double> columnsOffset) { if (column == null) { return(new Point()); } Debug.Assert(columnsOffset != null); Debug.Assert(columnsOffset.Contains(column)); var columnOffset = columnsOffset[column]; return(new Point(columnOffset, 0d)); }
private Point CalculateCellOffset(ColumnBase column, IColumnInfoCollection <double> columnsOffset, double horizontalOffset, double fixedColumnsWidth, double compensationOffset) { if (column == null) { return(new Point()); } Debug.Assert(columnsOffset != null); Debug.Assert(columnsOffset.Contains(column)); var columnOffset = columnsOffset[column]; // Calculate the offset of the cell's parent column: // The original offset of the Column // - the horizontal offset of the ScrollViewer to scroll to the right // - the width of the fixed columns since we are in the Scrolling FixedCellSubPanel // + the compensation offset used in master detail to avoid scrolling when not required return(new Point(columnOffset - horizontalOffset - fixedColumnsWidth + compensationOffset, 0d)); }