public Row(ResizableGrid owner, int rowIndex) : base(owner) { RowCellList = new List <RowCell>(); foreach (ContentPresenter cp in Owner.Children) { GridColumnData gridColumnData = (GridColumnData)cp.Content; ColumnBase gridColumn = gridColumnData.Column; int row = BandedViewBehavior.GetRow(gridColumn); int rowSpan = BandedViewBehavior.GetRowSpan(gridColumn); if (row <= rowIndex && row + rowSpan > rowIndex) { RowCellList.Add(new RowCell(Owner, gridColumn, cp)); } Comparison <RowCell> sortingMethos = (rowCell1, rowCell2) => { if (rowCell1.Column == rowCell2.Column) { return(0); } return(rowCell1.Column < rowCell2.Column ? -1 : 1); }; RowCellList.Sort(sortingMethos); } }
public Rows(ResizableGrid owner) : base(owner) { RowList = new List <Row>(); for (int i = 0; i < Owner.BandBehavior.RowDefinitions.Count; i++) { RowList.Add(new Row(Owner, i)); } //UpdateAllowResizingPropertyForEachRowCell(); }
public RowCell(ResizableGrid owner, ColumnBase gridColumn, ContentPresenter contentPresenter) : base(owner) { GridColumnPresenter = contentPresenter; GridColumn = gridColumn; Row = BandedViewBehavior.GetRow(GridColumn); RowSpan = BandedViewBehavior.GetRowSpan(GridColumn); Column = BandedViewBehavior.GetColumn(GridColumn); ColumnSpan = BandedViewBehavior.GetColumnSpan(GridColumn); ColumnDefinitions = new ColumnDefinitions(); for (int i = Column; i < Column + ColumnSpan; i++) { ColumnDefinitions.Add(Owner.BandBehavior.ColumnDefinitions[i]); } }
public HelperBase(ResizableGrid owner) { Owner = owner; }