menu

WinForms

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

    Show / Hide Table of Contents

    Class SplitButton

    Inheritance
    System.Object
    BaseControl
    SplitButton
    Implements
    IThemeProvider
    IVisualStyle
    System.IDisposable
    Inherited Members
    BaseControl.CanApplyTheme
    BaseControl.CanOverrideStyle
    BaseControl.ControlName
    BaseControl.GetActiveThemeName()
    BaseControl.IsVisualStyleEnabled
    BaseControl.IThemeProvider.BaseThemeName
    BaseControl.IVisualStyle.VisualTheme
    BaseControl.RaiseThemeChanged(Object, ThemeChangedEventArgs)
    BaseControl.ThemeName
    BaseControl.ThemeNameChanged
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class SplitButton : BaseControl, IThemeProvider, IVisualStyle, IDisposable

    Constructors

    SplitButton()

    Constructor

    Declaration
    public SplitButton()

    Fields

    ArrowBColor

    Assign initial color to the ArrowButton Background

    Declaration
    public SolidBrush ArrowBColor
    Field Value
    Type
    System.Drawing.SolidBrush

    ButtonToogleMode

    Button toogle mode indicator

    Declaration
    public bool ButtonToogleMode
    Field Value
    Type
    System.Boolean

    DefaultColor

    Color code for Button's DefaultColor State

    Declaration
    public string[] DefaultColor
    Field Value
    Type
    System.String[]

    DisabledColor

    Color code for Button's Disabled State

    Declaration
    public string[] DisabledColor
    Field Value
    Type
    System.String[]

    OnoverColor

    Color code for Button's Actived State

    Declaration
    public string[] OnoverColor
    Field Value
    Type
    System.String[]

    PressedColor

    Pressed color

    Declaration
    public string[] PressedColor
    Field Value
    Type
    System.String[]

    prev_backcolor

    BackColor

    Declaration
    protected Color prev_backcolor
    Field Value
    Type
    System.Drawing.Color

    SplitterInnerColor

    Initial Spliter Color

    Declaration
    public Color SplitterInnerColor
    Field Value
    Type
    System.Drawing.Color

    Properties

    BackColor

    Gets or sets the Background color of the button control.

    Declaration
    public override Color BackColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    BeforeTouchSize

    Gets/Sets Control size before touch enabled

    Declaration
    public Size BeforeTouchSize { get; set; }
    Property Value
    Type
    System.Drawing.Size

    ButtonMode

    get or set the value for ButtonToogleMode

    Declaration
    public ButtonMode ButtonMode { get; set; }
    Property Value
    Type
    ButtonMode

    DefaultSize

    Declaration
    protected override Size DefaultSize { get; }
    Property Value
    Type
    System.Drawing.Size

    DropDownIconColor

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

    DropDownItems

    Holds the DropDown Items

    Declaration
    public SplitButtonItemsCollection DropDownItems { get; }
    Property Value
    Type
    SplitButtonItemsCollection

    DropDownPosition

    Declaration
    public Position DropDownPosition { get; set; }
    Property Value
    Type
    Position

    DropDownRenderer

    Gets or sets the DropDown renderer of the SplitButton used to customize the appearance of the SplitButton DropDown look and feel of Syncfusion.Windows.Forms.Tools.ContextMenuStripEx

    Declaration
    public ToolStripRenderer DropDownRenderer { get; set; }
    Property Value
    Type
    System.Windows.Forms.ToolStripRenderer

    EnableTouchMode

    Gets or sets value to enable or disable the Touchmode to the controls.

    Declaration
    public bool EnableTouchMode { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    Scale factor will be updated automatically if scalefactor is equal to 1

    Font

    Gets or sets the System.Drawing.Font value for the control.

    Declaration
    public override Font Font { get; set; }
    Property Value
    Type
    System.Drawing.Font

    IsButtonChecked

    State of the Button Either Checked or UnChecked

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

    Renderer

    Declaration
    public ISplitButtonRenderer Renderer { get; set; }
    Property Value
    Type
    ISplitButtonRenderer

    ShowDropDownOnButtonClick

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

    Style

    Gets / Sets the value of Style

    Declaration
    public SplitButtonVisualStyle Style { get; set; }
    Property Value
    Type
    SplitButtonVisualStyle

    ThemeStyle

    Gets or sets the SplitButtonAdvVisualStyle value used to customize the appearance of the SplitButton.

    Declaration
    public SplitButtonAdvVisualStyle ThemeStyle { get; set; }
    Property Value
    Type
    SplitButtonAdvVisualStyle
    Remarks

    This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.

    UseMnemonic

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

    Methods

    ApplyScaleToControl(Single)

    Scale the control based on the scale factor passed in the argument.

    Declaration
    public void ApplyScaleToControl(float scaleFactor)
    Parameters
    Type Name Description
    System.Single scaleFactor

    value to scale the factor based upon.

    ArgToRadians(Int64)

    Declaration
    protected static double ArgToRadians(long arg)
    Parameters
    Type Name Description
    System.Int64 arg
    Returns
    Type
    System.Double

    buttonDropDown_MouseEnter(Object, EventArgs)

    Fire while ButtonDropDown get Focus

    Declaration
    public void buttonDropDown_MouseEnter(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    buttonDropDown_MouseLeave(Object, EventArgs)

    Fire while ButtonDropDown lost Focus

    Declaration
    public void buttonDropDown_MouseLeave(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    CreateAccessibilityInstance()

    Declaration
    protected override AccessibleObject CreateAccessibilityInstance()
    Returns
    Type
    System.Windows.Forms.AccessibleObject

    Dispose(Boolean)

    Disposes control elements

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    DrawArrow(PaintEventArgs)

    Helps to draw Drop Down Button Image for SplitButton control.

    Declaration
    public void DrawArrow(PaintEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs e

    DrawBorder(PaintEventArgs)

    Helps to draw Border for SplitButton control.

    Declaration
    public void DrawBorder(PaintEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs e

    GetControlName(String)

    Helps to apply the ControlName settings in control

    Declaration
    public override string GetControlName(string controlName)
    Parameters
    Type Name Description
    System.String controlName

    ControlName

    Returns
    Type
    System.String
    Overrides
    BaseControl.GetControlName(String)

    GetGradientcolors(PaintEventArgs, Int32, Int32, Int32, Int32, Int32, String[], Color)

    Perform Button Back Color

    Declaration
    public void GetGradientcolors(PaintEventArgs e, int x, int y, int width, int height, int angle, string[] gcolors, Color backcolor)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs e
    System.Int32 x
    System.Int32 y
    System.Int32 width
    System.Int32 height
    System.Int32 angle
    System.String[] gcolors
    System.Drawing.Color backcolor

    OnCanApplyThemeChanged(Boolean)

    Helps to apply the CanApplyTheme settings in control

    Declaration
    public override void OnCanApplyThemeChanged(bool canApplyTheme)
    Parameters
    Type Name Description
    System.Boolean canApplyTheme
    Overrides
    BaseControl.OnCanApplyThemeChanged(Boolean)

    OnCanOverrideStyleChanged(Boolean)

    Helps to apply the CanOverriderStyle settings in control

    Declaration
    public override void OnCanOverrideStyleChanged(bool canOverriderStyle)
    Parameters
    Type Name Description
    System.Boolean canOverriderStyle
    Overrides
    BaseControl.OnCanOverrideStyleChanged(Boolean)

    OnClick(EventArgs)

    Declaration
    protected override void OnClick(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnDoubleClick(EventArgs)

    Declaration
    protected override void OnDoubleClick(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnEnabledChanged(EventArgs)

    Declaration
    protected override void OnEnabledChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnFontChanged(EventArgs)

    Font changed

    Declaration
    protected override void OnFontChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnGotFocus(EventArgs)

    Occurs when the SplitButton get Focus.

    Declaration
    protected override void OnGotFocus(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnKeyDown(KeyEventArgs)

    Overrides the KeyDown Event for providing AccessKey Support for SplitButton Control.

    Declaration
    protected override void OnKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs e

    KeyEventArgs

    OnLostFocus(EventArgs)

    Occurs when the SplitButton lost Focus.

    Declaration
    protected override void OnLostFocus(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnMouseDown(MouseEventArgs)

    Declaration
    protected override void OnMouseDown(MouseEventArgs mevent)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs mevent

    OnMouseEnter(EventArgs)

    Declaration
    protected override void OnMouseEnter(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnMouseLeave(EventArgs)

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

    OnMouseMove(MouseEventArgs)

    Declaration
    protected override void OnMouseMove(MouseEventArgs mevent)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs mevent

    OnMouseUp(MouseEventArgs)

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

    OnPaint(PaintEventArgs)

    Overrides the Paint Event for drawing SplitButton Control

    Declaration
    protected override void OnPaint(PaintEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs e

    PaintEventArgs

    OnResize(EventArgs)

    Declaration
    protected override void OnResize(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnSizeChanged(EventArgs)

    Declaration
    protected override void OnSizeChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnTextChanged(EventArgs)

    Declaration
    protected override void OnTextChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnThemeNameChanged(String)

    Helps to apply the ThemeName settings in control

    Declaration
    public override void OnThemeNameChanged(string themeName)
    Parameters
    Type Name Description
    System.String themeName

    ThemeName

    Overrides
    BaseControl.OnThemeNameChanged(String)

    PaintButton(PaintEventArgs)

    It performs Button painting as setting Border Color, BackGround Color, Arrow Color, using Button Renderer

    Declaration
    protected void PaintButton(PaintEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs e

    ResetButtonMode()

    Declaration
    protected void ResetButtonMode()

    ResetDropDownRenderer()

    Resets the DropDownRenderer property to it's default value.

    Declaration
    public void ResetDropDownRenderer()

    SetNormalStateColor()

    Border color and Background Color while the Button is in normal state

    Declaration
    protected void SetNormalStateColor()

    SetOwner(SplitButton)

    Declaration
    public void SetOwner(SplitButton value)
    Parameters
    Type Name Description
    SplitButton value

    ShouldSerializeButtonMode()

    Declaration
    protected bool ShouldSerializeButtonMode()
    Returns
    Type
    System.Boolean

    ShouldSerializeDropDownIconColor()

    Declaration
    protected bool ShouldSerializeDropDownIconColor()
    Returns
    Type
    System.Boolean

    ShouldSerializeDropDownRenderer()

    Indicates whether the current value of the DropDownRenderer property is to be serialized.

    Declaration
    protected bool ShouldSerializeDropDownRenderer()
    Returns
    Type
    System.Boolean

    ShouldSerializeIsButtonChecked()

    Declaration
    protected bool ShouldSerializeIsButtonChecked()
    Returns
    Type
    System.Boolean

    ShouldSerializeRenderer()

    Declaration
    protected bool ShouldSerializeRenderer()
    Returns
    Type
    System.Boolean

    WndProc(ref Message)

    Declaration
    protected override void WndProc(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m

    Events

    Checked

    Checked EventHandler for ToogleButton

    Declaration
    public event EventHandler Checked
    Event Type
    Type
    System.EventHandler

    DropDowItemClicked

    DropDownItemEventHandler , when the dropdown item is clicked.

    Declaration
    public event ToolStripItemClickedEventHandler DropDowItemClicked
    Event Type
    Type
    System.Windows.Forms.ToolStripItemClickedEventHandler

    UnChecked

    UnChecked EventHandler for ToogleButton

    Declaration
    public event EventHandler UnChecked
    Event Type
    Type
    System.EventHandler

    Implements

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