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
RT @CodeSnippetsNET: Get Devexpress Wizardpage by Name in C# and #VB .NET http://t.co/xKiUisdZ1Q #csharp #dotnet