Having trouble getting help?
Contact Support
Contact Support
Button Mode in Windows Forms Split Button
29 Apr 20211 minute to read
This feature enables you to set the button in normal or toggle mode.
- Norma Mode - Execute normal button command
- Toggle Mode - Execute toggle mode click event
Setting button mode
You can set the button mode using the ButtonMode property.
The following code illustrates how to set the button in normal mode:
this.splitButton1.ButtonMode = Syncfusion.Windows.Forms.Tools.ButtonMode.Normal;
Me.splitButton1.ButtonMode = Syncfusion.Windows.Forms.Tools.ButtonMode.Normal
The following code illustrates how to set the button in toggle mode:
this.splitButton1.ButtonMode = Syncfusion.Windows.Forms.Tools.ButtonMode.Toggle;
Me.splitButton1.ButtonMode = Syncfusion.Windows.Forms.Tools.ButtonMode.Toggle
Setting Button State for Toggle Mode
You can set the button state using the IsButtonChecked property. When this is set to true button will be in Checked state. When this is set to false button will be in Unchecked state. This Property will active only When this SplitButton in Toggle Mode.
The following code illustrates how to set the button in checked state:
splitButton1.isButtonChecked = true;
splitButton1.isButtonChecked = True
The following code illustrates how to set the button in unchecked state:
splitButton1.isButtonChecked = false;
splitButton1.isButtonChecked = False