public BuildGrid ( int nCols, int nRows, CellSizeStyle cellSizeStyle ) : void | ||
nCols | int | |
nRows | int | |
cellSizeStyle | CellSizeStyle | |
리턴 | void |
public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx) { if (gridBoxRenderE == null) { var myGridBox = new GridBoxRenderElement(rootgfx, this.Width, this.Height); myGridBox.SetLocation(this.Left, this.Top); this.SetPrimaryRenderElement(myGridBox); this.gridBoxRenderE = myGridBox; //create layers int nrows = this.gridTable.RowCount; int ncols = this.gridTable.ColumnCount; //---------------------------------------- myGridBox.BuildGrid(ncols, nrows, this.CellSizeStyle); //add grid content for (int c = 0; c < ncols; ++c) { for (int r = 0; r < nrows; ++r) { var gridCell = gridTable.GetCell(r, c); var content = gridCell.ContentElement as UIElement; if (content != null) { myGridBox.SetContent(r, c, content); } } } } return(gridBoxRenderE); }
public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx) { if (gridBoxRenderE == null) { var myGridBox = new GridBoxRenderElement(rootgfx, this.Width, this.Height); myGridBox.SetLocation(this.Left, this.Top); this.SetPrimaryRenderElement(myGridBox); this.gridBoxRenderE = myGridBox; //create layers int nrows = this.gridTable.RowCount; int ncols = this.gridTable.ColumnCount; //---------------------------------------- myGridBox.BuildGrid(ncols, nrows, this.CellSizeStyle); //add grid content for (int c = 0; c < ncols; ++c) { for (int r = 0; r < nrows; ++r) { var gridCell = gridTable.GetCell(r, c); var content = gridCell.ContentElement as UIElement; if (content != null) { myGridBox.SetContent(r, c, content); } } } } return gridBoxRenderE; }