Taking a break and coming back to this with a clear head, I think i have fixed it. The answer is actually ridiculously easy. The problems manifest themselves when you try to nagivate forwards and backwards after jumping in - strange things
happen with the e.NextStepIndex value if you watch the next/prev button events fired - so the solution is to just hook the NextButtonClick and PreviousButtonClick events on the Wizard, and override the screwy e.NextStepindex settings by deliberately setting
the ActiveStepIndex each time.
You get an ActiveStepChanged event firing when you make those changes to ActiveStepIndex, but that's expected and fine by me.
This seems to work for me, though I can't understand why this wouldn't be what's going on inside the control anyway. I guess either I'm misunderstanding how it's supposed to work, or this is a bug.
Matt Wynne
Member
40 Points
8 Posts
Re: Setting ActiveStepindex on a Wizard Control
Mar 18, 2006 06:58 PM|LINK
void TheWizard_PreviousButtonClick(object sender, WizardNavigationEventArgs e)
{
((Wizard)sender).ActiveStepIndex = ((Wizard)sender).ActiveStepIndex - 1;
}
void TheWizard_NextButtonClick(object sender, WizardNavigationEventArgs e)
{
((Wizard)sender).ActiveStepIndex = ((Wizard)sender).ActiveStepIndex + 1;
}
You get an ActiveStepChanged event firing when you make those changes to ActiveStepIndex, but that's expected and fine by me.
This seems to work for me, though I can't understand why this wouldn't be what's going on inside the control anyway. I guess either I'm misunderstanding how it's supposed to work, or this is a bug.
Hope this helps someone else.
cheers,
Matt