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

DrawFlatButton() public method

public DrawFlatButton ( Graphics g, ButtonBase b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle ) : void
g System.Drawing.Graphics
b ButtonBase
textBounds System.Drawing.Rectangle
imageBounds System.Drawing.Rectangle
clipRectangle System.Drawing.Rectangle
return void
		public override void DrawFlatButton (Graphics g, ButtonBase b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle)
		{
			// Draw Button Background
			if (b.BackgroundImage == null)
				DrawFlatButtonBackground (g, b, clipRectangle);

			// If we have an image, draw it
			if (imageBounds.Size != Size.Empty)
				DrawFlatButtonImage (g, b, imageBounds);

			// If we're focused, draw a focus rectangle
			if (b.Focused && b.Enabled && b.ShowFocusCues)
				DrawFlatButtonFocus (g, b);

			// If we have text, draw it
			if (textBounds != Rectangle.Empty)
				DrawFlatButtonText (g, b, textBounds);
		}
ThemeWin32Classic