Version

DrawOffice2007RibbonButtonBorders(Graphics,Rectangle,Rectangle,Corners,Color,Color,Color) Method

Draws a border in the style of an an Office2007 Ribbon Button.
Syntax
'Declaration
 
Public Overloads Shared Sub DrawOffice2007RibbonButtonBorders( _
   ByVal g As Graphics, _
   ByVal rect As Rectangle, _
   ByVal invalidRect As Rectangle, _
   ByVal corners As Corners, _
   ByVal borderColorDark As Color, _
   ByVal borderColorLight As Color, _
   ByVal borderColorInner As Color _
) 
public static void DrawOffice2007RibbonButtonBorders( 
   Graphics g,
   Rectangle rect,
   Rectangle invalidRect,
   Corners corners,
   Color borderColorDark,
   Color borderColorLight,
   Color borderColorInner
)

Parameters

g
The System.Drawing.Graphics object used to perform the drawing operation.
rect
A System.Drawing.Rectangle describing the total area of the button.
invalidRect
A Rectangle describing the area to fill.
corners
An enumeration specifying which corners should be rounded.
borderColorDark
The System.Drawing.Color of the darker border color gradient.
borderColorLight
The lighter Color of the gradient.
borderColorInner
The Color of the inner button border.
Remarks

Office2007 Ribbon button borders are characterized by an outer border which is drawn with a vertical gradient and an inner border which is partially transparent and modifies the color of the Background.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also