Class ThemedButtonBase
Draws a themed button.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class ThemedButtonBase : ThemedControl, IThemeProvider, IVisualStyle, IDisposable
Constructors
ThemedButtonBase()
Initializes a new object.
Declaration
public ThemedButtonBase()
Fields
cd
Declaration
protected ControlDrawing cd
Field Value
Type |
---|
ControlDrawing |
mouseOver
Declaration
protected bool mouseOver
Field Value
Type |
---|
System.Boolean |
office2007ColorTable
Declaration
protected Office2007Colors office2007ColorTable
Field Value
Type |
---|
Office2007Colors |
office2010ColorTable
Declaration
protected Office2010Colors office2010ColorTable
Field Value
Type |
---|
Office2010Colors |
Properties
CheckState
Gets / sets the checked state.
Declaration
public CheckState CheckState { get; set; }
Property Value
Type |
---|
System.Windows.Forms.CheckState |
DefaultButtonState
Gets / sets the default button state.
Declaration
public ButtonState DefaultButtonState { get; set; }
Property Value
Type |
---|
System.Windows.Forms.ButtonState |
DrawText
Indicates whether to draw the button text.
Declaration
public bool DrawText { get; set; }
Property Value
Type |
---|
System.Boolean |
FlatColor
Gets / sets the flatcolor of the themed button.
Declaration
public Color FlatColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Image
Gets or sets image for draw foreground.
Declaration
public Image Image { get; set; }
Property Value
Type |
---|
System.Drawing.Image |
Office2007Theme
Indicates the Office2007 theme used for drawing the control.
Declaration
public Office2007Theme Office2007Theme { get; set; }
Property Value
Type |
---|
Office2007Theme |
Office2010Theme
Indicates the Office2010 theme used for drawing the control.
Declaration
public Office2010Theme Office2010Theme { get; set; }
Property Value
Type |
---|
Office2010Theme |
StretchImage
Indicate wether the image for button is stretched or shrunk to fit the size of the button.
Declaration
public bool StretchImage { get; set; }
Property Value
Type |
---|
System.Boolean |
Style
Gets or sets the visual style of the themed button.
Declaration
public VisualStyle Style { get; set; }
Property Value
Type |
---|
VisualStyle |
TextAlign
Gets / sets the text alignment.
Declaration
public ContentAlignment TextAlign { get; set; }
Property Value
Type |
---|
System.Drawing.ContentAlignment |
Methods
DrawControlText(Graphics)
Draws the text.
Declaration
protected virtual void DrawControlText(Graphics g)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | The graphics object. |
DrawImage(Graphics, ButtonState, CheckState)
Declaration
protected virtual void DrawImage(Graphics g, ButtonState buttonState, CheckState checkState)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | |
System.Windows.Forms.ButtonState | buttonState | |
System.Windows.Forms.CheckState | checkState |
DrawNotThemedControl(Graphics, ButtonState, CheckState)
Draws the button without themes.
Declaration
protected virtual void DrawNotThemedControl(Graphics g, ButtonState buttonState, CheckState checkState)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | Graphics object. |
System.Windows.Forms.ButtonState | buttonState | The button state. |
System.Windows.Forms.CheckState | checkState | The checked state. |
DrawStyledControl(Graphics, ButtonState, CheckState)
Draws the styled button without themes.
Declaration
protected virtual void DrawStyledControl(Graphics g, ButtonState buttonState, CheckState checkState)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | Graphics object. |
System.Windows.Forms.ButtonState | buttonState | The button state. |
System.Windows.Forms.CheckState | checkState | The checked state. |
DrawThemedControl(Graphics, ButtonState, CheckState)
Draws the button themed.
Declaration
protected virtual void DrawThemedControl(Graphics g, ButtonState buttonState, CheckState checkState)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | Graphics object. |
System.Windows.Forms.ButtonState | buttonState | The button state. |
System.Windows.Forms.CheckState | checkState | The checked state. |
OnCheckStateChanged(EventArgs)
Declaration
protected void OnCheckStateChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
OnImageChanged()
Declaration
protected virtual void OnImageChanged()
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e |
OnMouseMove(MouseEventArgs)
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e |
OnPaint(PaintEventArgs)
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | e |
OnParentBackColorChanged(EventArgs)
Declaration
protected override void OnParentBackColorChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
OnStretchImageChanged()
Declaration
protected virtual void OnStretchImageChanged()
Events
CheckStateChanged
Declaration
public event EventHandler CheckStateChanged
Event Type
Type |
---|
System.EventHandler |
ImageChanged
Occurs when Image is changed.
Declaration
public event EventHandler ImageChanged
Event Type
Type |
---|
System.EventHandler |
StretchImageChanged
Occurs when StretchImage is changed.
Declaration
public event EventHandler StretchImageChanged
Event Type
Type |
---|
System.EventHandler |