System.Windows.Forms.ThemeWin32Classic.CheckBox_DrawCheckBox C# (CSharp) Method

CheckBox_DrawCheckBox() protected method

protected CheckBox_DrawCheckBox ( Graphics dc, CheckBox checkbox, ButtonState state, Rectangle checkbox_rectangle ) : void
dc System.Drawing.Graphics
checkbox CheckBox
state ButtonState
checkbox_rectangle System.Drawing.Rectangle
return void
		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);
				}
			}
		}
		
ThemeWin32Classic