Class ExButton
- Namespace
- ExControls
- Assembly
- ExControls.dll
Extended Button control: in the custom style (DefaultStyle = false) it is flat with border and background colors for the hover, pressed and focus states (ExFlatAppearance).
[ToolboxBitmap(typeof(ToolboxIcons), "Toolbox.ExButton.ico")]
public class ExButton : Button, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IButtonControl, IExControl, IThemeable
- Inheritance
-
ExButton
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
ExButton()
Initializes a new instance of the ExButton class.
public ExButton()
Properties
DefaultStyle
Gets or sets whether the control uses the default Windows style; false = the custom style drawn by the control with its own colors.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Default style of the Control.")]
public bool DefaultStyle { get; set; }
Property Value
DisabledForeColor
[Browsable(false)]
public Color DisabledForeColor { get; }
Property Value
ExFlatAppearance
Gets the border and background colors of the button for the mouse and focus states, used when DefaultStyle is false.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("ButtonFlatAppearance")]
public ExFlatButtonAppearance ExFlatAppearance { get; }
Property Value
FlatStyle
Gets or sets the flat style appearance of the button. When DefaultStyle is false, the style is always Flat.
public FlatStyle FlatStyle { get; set; }
Property Value
Methods
ApplyTheme(ExTheme)
Sets the colors and appearance of the control by the theme.
public virtual void ApplyTheme(ExTheme theme)
Parameters
themeExTheme
OnDefaultStyleChanged()
Raises the DefaultStyleChanged event.
protected virtual void OnDefaultStyleChanged()
OnGotFocus(EventArgs)
Raises the GotFocus event.
protected override void OnGotFocus(EventArgs e)
Parameters
OnLostFocus(EventArgs)
Raises the OnLostFocus(EventArgs) event.
protected override void OnLostFocus(EventArgs e)
Parameters
OnMouseDown(MouseEventArgs)
Raises the OnMouseDown(MouseEventArgs) event.
protected override void OnMouseDown(MouseEventArgs mevent)
Parameters
meventMouseEventArgsA MouseEventArgs that contains the event data.
OnMouseEnter(EventArgs)
Raises the MouseEnter event.
protected override void OnMouseEnter(EventArgs e)
Parameters
OnMouseLeave(EventArgs)
Raises the MouseLeave event.
protected override void OnMouseLeave(EventArgs e)
Parameters
OnMouseUp(MouseEventArgs)
Raises the OnMouseUp(MouseEventArgs) event.
protected override void OnMouseUp(MouseEventArgs mevent)
Parameters
meventMouseEventArgsA MouseEventArgs that contains the event data.
OnPaint(PaintEventArgs)
Raises the OnPaint(PaintEventArgs) event.
protected override void OnPaint(PaintEventArgs pevent)
Parameters
peventPaintEventArgsA PaintEventArgs that contains the event data.
Events
DefaultStyleChanged
Occurs when the DefaultStyle property changes.
[ExCategory("Changed Property")]
[ExDescription("Occurs when the BorderColor property changes.")]
public event EventHandler? DefaultStyleChanged