Category / Section
How to add custom buttons in Wizard Control?
1 min read
Custom buttons can be added to WizardPage in WizardControl using the GridBagLayout property. The following code is to demonstrate the same.
C#
//To add a new button Button btn = new Button(); btn.Text = "Custom Button"; //Add button to the WizardControl this.wizardControl1.Controls.Add(btn); //Set the constraints for the newly created Button this.wizardControl1.GridBagLayout.GetConstraintsRef(btn).GridPosX = 0; this.wizardControl1.GridBagLayout.GetConstraintsRef(btn).GridPosY = 5;
VB
'To add a new button Dim btn As New Button() btn.Text = "Custom Button" 'Add button to the WizardControl Me.wizardControl1.Controls.Add(btn) 'Set the constraints for the newly created Button Me.wizardControl1.GridBagLayout.GetConstraintsRef(btn).GridPosX = 0 Me.wizardControl1.GridBagLayout.GetConstraintsRef(btn).GridPosY = 5
Screenshot
Figure 1: Wizard Control
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/WizardControl-2053339487.zip