/// <summary>
        /// Coercion call back for clip property which ensures that the cell overlapping with frozen
        /// column gets clipped appropriately.
        /// </summary>
        /// <param name="d"></param>
        /// <param name="baseValue"></param>
        /// <returns></returns>
        private static object OnCoerceClip(DependencyObject d, object baseValue)
        {
            DataGridCell cell           = (DataGridCell)d;
            Geometry     geometry       = baseValue as Geometry;
            Geometry     frozenGeometry = DataGridHelper.GetFrozenClipForCell(cell);

            if (frozenGeometry != null)
            {
                if (geometry == null)
                {
                    return(frozenGeometry);
                }

                geometry = new CombinedGeometry(GeometryCombineMode.Intersect, geometry, frozenGeometry);
            }

            return(geometry);
        }