protected override void OnRenderCellBorder(DrawingContext dc, Rect cellRect, Geometry clipGeometry, DataColumnBase dataColumnBase, GridCell gridCell)
        {
            var borderThickness = gridCell.BorderThickness;
            var borderBursh     = gridCell.BorderBrush;
            var needClip        = false;

            if (clipGeometry != null)
            {
                clipGeometry.Freeze();
                dc.PushClip(clipGeometry);
                needClip = true;
            }
            cellRect.Y = cellRect.Y - (borderThickness.Bottom / 2);
            cellRect.X = cellRect.X - (borderThickness.Right / 2);
            switch (gridCell.GridCellRegion)
            {
            case "NormalCell":
                dataColumnBase.RenderBorder(dc, dataColumnBase.borderPen, cellRect, borderBursh, borderThickness, false, false, false, true);    // Bottom border.
                break;

            case "LastColumnCell":
                dataColumnBase.RenderBorder(dc, dataColumnBase.borderPen, cellRect, borderBursh, borderThickness, false, false, true, true);     // Renders Right, Bottom border.
                break;
            }
            if (needClip)
            {
                dc.Pop();
            }
        }
        protected override void OnRenderCellBorder(DrawingContext dc, Rect cellRect, Geometry clipGeometry, DataColumnBase dataColumnBase, GridCell gridCell)
        {
            if (gridCell.GridCellRegion.Equals("NormalCell"))
            {
                var borderBursh     = gridCell.BorderBrush;
                var borderThickness = gridCell.BorderThickness;
                var needClip        = false;
                if (clipGeometry != null)
                {
                    clipGeometry.Freeze();
                    dc.PushClip(clipGeometry);
                    needClip = true;
                }

                cellRect.Y = cellRect.Y - (borderThickness.Bottom / 2);
                cellRect.X = cellRect.X - (borderThickness.Right / 2);
                dataColumnBase.RenderBorder(dc, dataColumnBase.borderPen, cellRect, borderBursh, borderThickness, false, false, false, true);// Renders Bottom border.
                if (needClip)
                {
                    dc.Pop();
                }
            }
            else
            {
                base.OnRenderCellBorder(dc, cellRect, clipGeometry, dataColumnBase, gridCell);
            }
        }