This class allows users to draw BarItem and CommandBar for Office2007 visual style.
Inheritance
System.Object
Office2007BarItemPainter
Assembly: Syncfusion.Tools.Windows.dll
public class Office2007BarItemPainter : Object
Constructors
Declaration
public Office2007BarItemPainter()
Fields
Hashtable for flash bitmaps.
Declaration
protected static Hashtable m_htBitmaps
Field Value
| Type |
| System.Collections.Hashtable |
Properties
Gets bitmap for checked flash.
Declaration
protected static Bitmap CheckedFlashImage { get; }
Property Value
| Type |
| System.Drawing.Bitmap |
Gets or sets color table for Office2007 visual style.
Declaration
public static Office2007Colors ColorTable { get; set; }
Property Value
Gets bitmap for pressed flash.
Declaration
protected static Bitmap PressedFlashImage { get; }
Property Value
| Type |
| System.Drawing.Bitmap |
Gets bitmap for selected flash.
Declaration
protected static Bitmap SelectedFlashImage { get; }
Property Value
| Type |
| System.Drawing.Bitmap |
Methods
Declaration
public static void DrawBarItem(Graphics g, Rectangle rect, ItemState state, bool bHorizontal)
Parameters
| Type |
Name |
Description |
| System.Drawing.Graphics |
g |
|
| System.Drawing.Rectangle |
rect |
|
| ItemState |
state |
|
| System.Boolean |
bHorizontal |
|
Draws background for ComboBoxBarItem.
Declaration
public static void DrawComboBoxBarItem(Graphics g, Rectangle rect, ItemState state)
Parameters
| Type |
Name |
Description |
| System.Drawing.Graphics |
g |
|
| System.Drawing.Rectangle |
rect |
|
| ItemState |
state |
|
Draws ComboButton for ComboBoxBarItem.
Declaration
public static void DrawComboButton(Graphics g, Rectangle rect, ItemState state, bool bHorizontal)
Parameters
| Type |
Name |
Description |
| System.Drawing.Graphics |
g |
|
| System.Drawing.Rectangle |
rect |
|
| ItemState |
state |
|
| System.Boolean |
bHorizontal |
|
Declaration
public static void DrawDropDownBarItem(Graphics g, Rectangle rect, ItemState state, bool bHorizontal)
Parameters
| Type |
Name |
Description |
| System.Drawing.Graphics |
g |
|
| System.Drawing.Rectangle |
rect |
|
| ItemState |
state |
|
| System.Boolean |
bHorizontal |
|
Declaration
public static void DrawSeparator(Graphics g, RectangleF rect, bool bRTL)
Parameters
| Type |
Name |
Description |
| System.Drawing.Graphics |
g |
|
| System.Drawing.RectangleF |
rect |
|
| System.Boolean |
bRTL |
|
Declaration
public static void DrawTextBoxBarItem(Graphics g, Rectangle rect, ItemState state, bool bHorizontal)
Parameters
| Type |
Name |
Description |
| System.Drawing.Graphics |
g |
|
| System.Drawing.Rectangle |
rect |
|
| ItemState |
state |
|
| System.Boolean |
bHorizontal |
|
Declaration
public static Color GetAlphaBlendedColor(Color src, Color dest, int alpha)
Parameters
| Type |
Name |
Description |
| System.Drawing.Color |
src |
|
| System.Drawing.Color |
dest |
|
| System.Int32 |
alpha |
|
Returns
| Type |
| System.Drawing.Color |
Declaration
protected static Bitmap GetFlashImage(Color colorBase, Size size)
Parameters
| Type |
Name |
Description |
| System.Drawing.Color |
colorBase |
|
| System.Drawing.Size |
size |
|
Returns
| Type |
| System.Drawing.Bitmap |
Gets horizontal linear gradient brush.
Declaration
protected static LinearGradientBrush GetHorizontalBrush(Rectangle rc, Color cl1, Color cl2)
Parameters
| Type |
Name |
Description |
| System.Drawing.Rectangle |
rc |
|
| System.Drawing.Color |
cl1 |
|
| System.Drawing.Color |
cl2 |
|
Returns
| Type |
| System.Drawing.Drawing2D.LinearGradientBrush |
Gets horizontal linear gradient brush.
Declaration
protected static LinearGradientBrush GetHorizontalBrush(int left, int width, Color cl1, Color cl2)
Parameters
| Type |
Name |
Description |
| System.Int32 |
left |
|
| System.Int32 |
width |
|
| System.Drawing.Color |
cl1 |
|
| System.Drawing.Color |
cl2 |
|
Returns
| Type |
| System.Drawing.Drawing2D.LinearGradientBrush |
Declaration
public static Point[] GetRoundedPolygon(Rectangle rc, int iRadius)
Parameters
| Type |
Name |
Description |
| System.Drawing.Rectangle |
rc |
|
| System.Int32 |
iRadius |
|
Returns
| Type |
| System.Drawing.Point[] |
Gets vertical linear gradient brush.
Declaration
protected static LinearGradientBrush GetVerticalBrush(Rectangle rc, Color cl1, Color cl2)
Parameters
| Type |
Name |
Description |
| System.Drawing.Rectangle |
rc |
|
| System.Drawing.Color |
cl1 |
|
| System.Drawing.Color |
cl2 |
|
Returns
| Type |
| System.Drawing.Drawing2D.LinearGradientBrush |
Gets vertical linear gradient brush.
Declaration
protected static LinearGradientBrush GetVerticalBrush(int top, int height, Color cl1, Color cl2)
Parameters
| Type |
Name |
Description |
| System.Int32 |
top |
|
| System.Int32 |
height |
|
| System.Drawing.Color |
cl1 |
|
| System.Drawing.Color |
cl2 |
|
Returns
| Type |
| System.Drawing.Drawing2D.LinearGradientBrush |