public override void RenderAfter(RenderContext context)
{
Debug.Assert(context != null);
// Validate incoming reference
if (context == null) throw new ArgumentNullException("context");
if (_drawCanvas && (_paletteBorder != null))
{
// Do we draw the border after the children?
if (DrawBorderLast)
{
// Set the clipping region back to original setting
Region oldRegion = context.Graphics.Clip;
context.Graphics.Clip = _clipRegion;
_clipRegion = null;
// Remember to dispose of the temporary region, no longer needed
oldRegion.Dispose();
RenderBorder(context, ClientRectangle);
}
}
}