public override void RenderBefore(RenderContext context)
{
Debug.Assert(context != null);
// Validate incoming reference
if (context == null) throw new ArgumentNullException("context");
if (!IgnoreRender)
{
// Do we need to draw the background?
if (_paletteBack.GetBackDraw(State) == InheritBool.True)
{
// Render the background
using (GraphicsPath panelPath = new GraphicsPath())
{
// The path encloses the entire panel area
panelPath.AddRectangle(ClientRectangle);
// Perform actual panel drawing
_memento = context.Renderer.RenderStandardBack.DrawBack(context, ClientRectangle, panelPath, _paletteBack, VisualOrientation, State, _memento);
}
}
}
}