WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DropDownButton

    Show / Hide Table of Contents

    Class DropDownButton

    Class that represents the drop-down portion of a ComboBoxBase.

    Inheritance
    System.Object
    DropDownButton
    Implements
    System.IDisposable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class DropDownButton : IDisposable

    Constructors

    DropDownButton(Control)

    Creates an instance of the DropDownButton class.

    Declaration
    public DropDownButton(Control control)
    Parameters
    Type Name Description
    System.Windows.Forms.Control control

    The control that is using this class to draw the drop-down portion.

    Fields

    _touchmode

    Gets the touchmode value.

    Declaration
    [CLSCompliant(false)]
    public bool _touchmode
    Field Value
    Type Description
    System.Boolean

    control

    Declaration
    protected Control control
    Field Value
    Type Description
    System.Windows.Forms.Control

    Properties

    Bounds

    Set the bounds for the dropdown button. You typically should do this from the control's Layout event / method.

    Declaration
    public Rectangle Bounds { get; set; }
    Property Value
    Type Description
    System.Drawing.Rectangle

    Enabled

    Indicates whether the buttons should be drawn enabled.

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    FlatStyle

    Gets or sets the ComboFlatStyle with which to draw.

    Declaration
    public ComboFlatStyle FlatStyle { get; set; }
    Property Value
    Type Description
    ComboFlatStyle

    Hot

    Indicates whether the button should be drawn hot.

    Declaration
    public bool Hot { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsActive

    Indicates whether the button is active. Will be referred to when drawn hot with office style.

    Declaration
    public bool IsActive { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsControlActive

    Indicates whether owner control is active.

    Declaration
    protected virtual bool IsControlActive { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is control active; otherwise, false.

    IsDroppedDown

    Indicates whether the drop-down is showing. Will be referred to when drawn hot with office style.

    Declaration
    public bool IsDroppedDown { get; set; }
    Property Value
    Type Description
    System.Boolean

    MetroArrowColor

    Gets/Sets Metro Arrow Color

    Declaration
    public Color MetroArrowColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    MetroColorTheme

    Declaration
    public MetroTheme MetroColorTheme { get; set; }
    Property Value
    Type Description
    MetroTheme

    Office2007ColorTheme

    Declaration
    public Office2007Theme Office2007ColorTheme { get; set; }
    Property Value
    Type Description
    Office2007Theme

    Office2010ColorTheme

    Declaration
    public Office2010Theme Office2010ColorTheme { get; set; }
    Property Value
    Type Description
    Office2010Theme

    Pushed

    Indicates whether the button is currently pushed.

    Declaration
    public bool Pushed { get; set; }
    Property Value
    Type Description
    System.Boolean

    Style

    Gets or sets the VisualStyle with which to draw.

    Declaration
    public VisualStyle Style { get; set; }
    Property Value
    Type Description
    VisualStyle

    SuspendInvalidates

    Gets or sets a value indicating whether invalidating of owner control is suspended.

    Declaration
    public bool SuspendInvalidates { get; set; }
    Property Value
    Type Description
    System.Boolean

    ThemeName

    Declaration
    public string ThemeName { get; set; }
    Property Value
    Type Description
    System.String

    ThemesEnabled

    Indicates whether themes is currently enabled for this control.

    Declaration
    protected bool ThemesEnabled { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This property doesn't check whether themes are currently enabled in the OS.

    Methods

    CancelMouseTrack()

    Cancels any mouse tracking.

    Declaration
    public void CancelMouseTrack()

    InvalidateBounds(Rectangle)

    Invalidates the specified portion in the underlying control.

    Declaration
    protected void InvalidateBounds(Rectangle bounds)
    Parameters
    Type Name Description
    System.Drawing.Rectangle bounds

    The area to invalidate.

    OnMouseDown(EventArgs)

    Raises the MouseDown event.

    Declaration
    protected virtual void OnMouseDown(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An EventArgs that contains the event data.

    Remarks

    Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

    The MouseDown method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

    Note to Inheritors: When overriding OnMouseDown in a derived class, be sure to call the base class's OnMouseDown method so that registered delegates receive the event.

    OnMouseDown(MouseEventArgs, Boolean)

    Call this method from the control's OnMouseDown to inform this class of mouse down events.

    Declaration
    public void OnMouseDown(MouseEventArgs e, bool useFullControlBounds)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    The MouseEventArsg in the OnMouseDown method.

    System.Boolean useFullControlBounds

    Indicates whether the full control bounds should be considered part of the button. Useful in a combo in list mode.

    OnMouseLeave(EventArgs)

    Call this method from the control's OnMouseLeave to inform this class of mouse leave events.

    Declaration
    public void OnMouseLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The EventArsg in the OnMouseLeave method.

    OnMouseMove(MouseEventArgs, Boolean)

    Call this method from the control's OnMouseMove to inform this class of mouse move events.

    Declaration
    public void OnMouseMove(MouseEventArgs e, bool useFullControlBounds)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    The MouseEventArsg in the OnMouseMove method.

    System.Boolean useFullControlBounds

    Indicates whether the full control bounds should be considered part of the button. Useful in a combo in list mode.

    OnMouseUp(MouseEventArgs)

    Call this method from the control's OnMouseUp to inform this class of mouse up events.

    Declaration
    public void OnMouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    The MouseEventArsg in the OnMouseUp method.

    OnPaint(Graphics)

    Call this method from the control's OnPaint method.

    Declaration
    public virtual void OnPaint(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The Graphics context using which to draw the button.

    ResetMetroArrowColor()

    Reset MetroArrowColor

    Declaration
    public void ResetMetroArrowColor()

    ShouldSerializeMetroArrowColor()

    To serialize MetroArrowColor

    Declaration
    public bool ShouldSerializeMetroArrowColor()
    Returns
    Type Description
    System.Boolean

    Events

    MouseDown

    Fired when the user performs a mouse down in the drop-down area.

    Declaration
    public event EventHandler MouseDown
    Event Type
    Type Description
    System.EventHandler

    Explicit Interface Implementations

    IDisposable.Dispose()

    Declaration
    void IDisposable.Dispose()

    Implements

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