protected virtual void CheckBox_DrawCheckBox( Graphics dc, CheckBox checkbox, ButtonState state, Rectangle checkbox_rectangle )
{
Brush brush = checkbox.BackColor.ToArgb () == ColorControl.ToArgb () ? SystemBrushes.Control : ResPool.GetSolidBrush (checkbox.BackColor);
dc.FillRectangle (brush, checkbox.ClientRectangle);
// render as per normal button
if (checkbox.appearance==Appearance.Button) {
ButtonBase_DrawButton (checkbox, dc);
if ((checkbox.Focused) && checkbox.Enabled)
ButtonBase_DrawFocus(checkbox, dc);
} else {
// establish if we are rendering a flat style of some sort
if (checkbox.FlatStyle == FlatStyle.Flat || checkbox.FlatStyle == FlatStyle.Popup) {
DrawFlatStyleCheckBox (dc, checkbox_rectangle, checkbox);
} else {
CPDrawCheckBox (dc, checkbox_rectangle, state);
}
}
}