The problem is, that the
SetActivePage(string newPageName)
searches for the NAME-Property of the WizardPage. So if you add 2 MiddlePages, which have the same Name, this method can't differ them.
That means -> Instead of:
this.Pages.Add(new WelcomePage());
this.Pages.Add(new MiddlePage());
this.Pages.Add(new MiddlePage());
this.Pages.Add(new CompletePage());
you can use:
MiddlePage mp = new MiddlePage();
mp.Name = "MidPage";
MiddlePage mp2 = new MiddlePage();
mp2.Name = "MidPage2";
Re: Adding Pages
SetActivePage(string newPageName)searches for the NAME-Property of the WizardPage. So if you add 2 MiddlePages, which have the same Name, this method can't differ them.That means -> Instead of:
this.Pages.Add(new WelcomePage());this.Pages.Add(new MiddlePage());
this.Pages.Add(new MiddlePage());
this.Pages.Add(new CompletePage());
you can use:
MiddlePage mp = new MiddlePage();
mp.Name = "MidPage";
MiddlePage mp2 = new MiddlePage();
mp2.Name = "MidPage2";
this.Pages.Add(new WelcomePage());
this.Pages.Add(mp);
this.Pages.Add(mp2);
this.Pages.Add(new CompletePage());
Now this should work :D