This project has moved and is read-only. For the latest updates, please go here.

Go to next WizardPage from custom button

Oct 23, 2015 at 2:23 PM
I want to go to the next WizardPage by using a normal <Button>, but I can't find any method to use.
I can set the NextPage property, but I don't know how to actually call a NextPage-method.

Does anyone know if this is possible? Thanks!
Developer
Oct 23, 2015 at 7:09 PM
Hi,

You need to change the Wizard.CurrentPage property to point to the WizardPage you want :
wizard.CurrentPage = wizard.Items.GetItemAt( wizard.Items.IndexOf( wizard.CurrentPage ) + 1 ) as WizardPage;
Marked as answer by BetaLyte on 10/26/2015 at 2:51 AM
Oct 26, 2015 at 10:51 AM
Edited Oct 26, 2015 at 10:52 AM
BoucherS wrote:
Hi,

You need to change the Wizard.CurrentPage property to point to the WizardPage you want :
wizard.CurrentPage = wizard.Items.GetItemAt( wizard.Items.IndexOf( wizard.CurrentPage ) + 1 ) as WizardPage;
Great, thanks a lot!

Bonus info: You can use the x:Name of the page directly, i.e.
wizard.CurrentPage = Page3;