menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ThemedButtonBase - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ThemedButtonBase

    Draws a themed button.

    Inheritance
    System.Object
    BaseControl
    ThemedControl
    ThemedButtonBase
    ThemedCheckButton
    ThemedScrollButton
    Implements
    IThemeProvider
    IVisualStyle
    System.IDisposable
    Inherited Members
    BaseControl.CanApplyTheme
    BaseControl.CanOverrideStyle
    BaseControl.ControlName
    BaseControl.GetActiveThemeName()
    BaseControl.GetControlName(String)
    BaseControl.IsVisualStyleEnabled
    BaseControl.IThemeProvider.BaseThemeName
    BaseControl.IVisualStyle.VisualTheme
    BaseControl.OnCanApplyThemeChanged(Boolean)
    BaseControl.OnCanOverrideStyleChanged(Boolean)
    BaseControl.OnThemeNameChanged(String)
    BaseControl.RaiseThemeChanged(Object, ThemeChangedEventArgs)
    BaseControl.ThemeName
    BaseControl.ThemeNameChanged
    ThemedControl.OnThemeChanged(EventArgs)
    ThemedControl.ThemeChanged
    ThemedControl.ThemesEnabled
    ThemedControl.WndProc(Message)
    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

    Implements

    IThemeProvider
    IVisualStyle
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved