Howdy Ken,
You can do whatever you want!! don't let anyone else tell you different...
Just for reference though...
Create Wizard Page to Object
First Create the object class or structure like the following:
private class MyWizardObject
{
private Divelements.WizardFramework.WizardPage _myPage;
public Divelements.WizardFramework.WizardPage MyPage
{
get { return _myPage; }
set { _myPage = value; }
}
}
Next create the method for getting back the wizard page so you can store it..
public Divelements.WizardFramework.WizardPage GetCurrentPage()
{
//Make sure you cast it here
return (Divelements.WizardFramework.WizardPage)this.wizard1.SelectedPage;
}
Next make the overload of the previous method to set the page (the method I gave you in the other post for string)
public void SetPage(Divelements.WizardFramework.WizardPage MyNewPage)
{
this.wizard1.SelectedPage = MyNewPage;
}
So now we are ready to rock and roll....
Instantiate the object class and fill the value via property using our method above
//Global Object
private MyWizardObject NewWizardObject = null;
/// <summary>
/// Instantiate a MyWizardObject Object and fill it
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
NewWizardObject = new MyWizardObject();
NewWizardObject.MyPage = this.Wizard1.GetCurrentPage();
}
Job's done... To tell the wizard to go to our page object call our overloaded method..
/// <summary>
/// Call our wizard method to set the page with our stored object value
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button2_Click(object sender, EventArgs e)
{
this.Wizard1.SetPage(NewWizardObject.MyPage);
}
Hope that helps...