public override void Render(RenderContext context)
{
Debug.Assert(context != null);
// If we do not have a custom control
if (_ribbonCustomControl.CustomControl == null)
{
// And we are in design time
if (_ribbon.InDesignMode)
{
// Draw rectangle is 1 pixel less per edge
Rectangle drawRect = ClientRectangle;
drawRect.Inflate(-1, -1);
drawRect.Height--;
// Draw an indication of where the custom control will be
context.Graphics.FillRectangle(Brushes.Salmon, drawRect);
context.Graphics.DrawRectangle(Pens.Red, drawRect);
}
}
}