Skybound Rebar

RebarMenuItemRenderer.DrawCheck Method 

Draws a check mark or radio check onto the specified Graphics surface.

[Visual Basic]
Public Shared Sub DrawCheck( _
   ByVal graphics As Graphics, _
   ByVal bounds As Rectangle, _
   ByVal brush As Brush, _
   ByVal radio As Boolean _
)
[C#]
public static void DrawCheck(
   Graphics graphics,
   Rectangle bounds,
   Brush brush,
   bool radio
);

Parameters

graphics
The Graphics surface to draw on.
bounds
The bounds in which the check is drawn. The check is always of a fixed size, and centered within these bounds.
brush
The Brush used to draw the check.
radio
Specify true if the check should be drawn as a check mark; otherwise, specify false, and the check is drawn as a radio check (a small circle).

Remarks

Several methods exist in ControlPaint to draw various styles of check marks, but all of them use a fixed size and color. DrawCheck enables you to provide a custom size and color brush and to draw it using a transparent background.

Example

This example draws a red, 13-pixel check mark at position (4, 4) on a graphics surface.

[Visual Basic]

Dim checkBounds As Rectangle = New Rectangle(Bounds.X + 4, Bounds.Y + 4, 13, 13)
RebarMenuItemRenderer.DrawCheck(e.Graphics, checkBounds, SystemBrushes.Red, False)

[C#]

Rectangle checkBounds = new Rectangle(Bounds.X + 4, Bounds.Y + 4, 13, 13);
RebarMenuItemRenderer.DrawCheck(e.Graphics, checkBounds, SystemBrushes.Red, false);

See Also

RebarMenuItemRenderer Class | Skybound.Rebar.Rendering Namespace