To get Devexpress Wizardpage by Name in C# and VB.NET you can use the following snippet.

Sample C#

public static WizardPage GetWizardPageByName(WizardControl wizard, string name)
{
	var controls = wizard.Controls.Find(name, false);
	if (controls.Length > 0 && controls[0] is WizardPage)
	{
		return controls[0] as WizardPage;
	}
	return null;
}

Sample VB.NET

Public Shared Function GetWizardPageByName(wizard As WizardControl, name As String) As WizardPage
	Dim controls = wizard.Controls.Find(name, False)
	If controls.Length > 0 AndAlso TypeOf controls(0) Is WizardPage Then
		Return TryCast(controls(0), WizardPage)
	End If
	Return Nothing
End Function

One thought on “How to get Devexpress Wizardpage by Name in C# and VB.NET”

Leave a Reply