Example #1
0
        protected virtual void OnRenderGrid(UIGrid control, CanvasRenderer renderer)
        {
            if (control.AutoPosition)
            {
                control.UpdateCellsPositionAndSize();
            }

            if (control.DisplayBorders)
            {
                foreach (var cell in control.GetCells())
                {
                    cell.GetScreenRectangle(out var rect);
                    renderer.AddRectangle(rect, new ColorValue(0.5, 0.5, 0.5));
                }
            }
        }