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

Initializing pages

If the page needs be initialized based on conditions present when the page is viewed, use the Initialize event.
public MyWizard()
{
   InitializeComponent();
   middlePage.Initialize += middlePage_Initialize;
}

private void middlePage_Initialize(object sender, AeroWizard.WizardPageInitEventArgs e)
{
   if (!System.IO.File.Exists("myfile.txt"))
      checkBox1.Enabled = false;
   else
      checkBox1.Checked = System.IO.File.ReadAllText("myfile.txt") == "true";
}

Handling page commits

This is the ideal way to determine when a page is completed and the user has elected to move forward. While the SelectedPageChanged event will also tell you that a new page has been loaded, the Commit event tells you that the user has completed work on a page and has chosen to move forward and allows you to prohibit that advance.
public MyWizard()
{
   InitializeComponent();
   dataPage.Commit += dataPage_Commit;
}

void dataPage_Commit(object sender, AeroWizard.WizardPageConfirmEventArgs e)
{
   // If the user hasn't provided a sufficiently long zip code, don't allow the commit
   if (zipTextBox.Text.Length < 5)
      e.Cancel = true;
   else
   {
      // Based on user selection for delivery option, go to appropriate page
      if (nextDayRadioButton.Checked)
         this.NextPage = nextDayMailPage;
      else
         this.NextPage = stdMailPage;
   }
}

Handling page rollbacks

If the user clicks the back button, the Rollback event is fired and can be handled to undo any actions that may have occurred on initialization or from user interactions with the page.
public MyWizard()
{
   InitializeComponent();
   middlePage.Rollback += middlePage_Rollback;
}

private void middlePage_Rollback(object sender, AeroWizard.WizardPageConfirmEventArgs e)
{
   File.Delete(filename);
}

Navigating

You can programmatically navigate to pages outside of the regular sequence at both run-time and design-time.

Run-time

private void button1_Click(object sender, EventArgs e)
{
   switch (itemText)
   {
      case "First Page":
         RestartPages();
         break;
      case "Previous Page":
         PreviousPage();
         break;
      case "Next Page":
         NextPage();
         break;
      case "Specific Page":
         NextPage(wizardPage10);
         break;
   }
}

Design-time

Navigation changes are handled through properties on a specific WizardPage.
  • To allow or disallow movement using the next, back or cancel buttons, use the AllowNext, AllowBack, and AllowCancel properties.
  • To hide the next, back or cancel buttons, set the ShowNext, ShowBack, and ShowCancel properties to false.
  • To indicate that a page is the last page in the sequence and should display the Finish text instead of the Next text on the Next/Finish button, use the IsFinishPage property.
  • To indicate a specific page that should be used when the user clicks the Next button or when the NextPage() method is called, use the NextPage property. This is used to override the default behavior of going to the next page in the sequence defined within the Pages collection.
  • To effectively hide a page from the normal flow of the Pages collection, set the Supress property to true.

Last edited Mar 21, 2015 at 7:38 PM by dahall, version 3

Comments

alendar Aug 25, 2014 at 6:29 PM 
Great control! I added it to my Visual Studio 2012 (update 4) 11.0.61030.00 on Windows 7 with .NET 4.5.2. installed on a Winforms project. Works great. dll dropped right in. runs, designer works. Pretty intuitive. Was able to add easily to toolbox.
Love the help text. It may look weird, but it helps me keep track of what page I'm on.

dahall Oct 17, 2012 at 3:49 PM 
Simply add the GlassExtenderProvider component to your form, and optionally set properties, to get a glass effect on the frame.

barbu110 Oct 17, 2012 at 8:32 AM 
Because the code is large, could you provide here the source for extending frame for Windows Basic UI? Thanks a lot!