locked
How to use the wizardpage control? RRS feed

  • Question

  • Hello,

    I'm developping my first add in for WHS. I got most of it working but now i would like to add a wizard to guide the user on adding objects.

    I looked around and couldn't find any tutorial or code sample on how to use the wizardpage controls.

    Anyone has a link or could help me out?

    Thanks
    Saturday, December 20, 2008 7:37 PM

Answers

  • Unfortunately, the wizardpage controls aren't as friendly as they seem; you can't just drop them on to a form and have an instant wizard :)

    Easiest way to see how Microsoft uses the controls is to crack open the Server Storage add-in with Reflector and have a dig around. Basically, they create an Array of controls and loop through them as the user clicks "next" or "back" (i.e. remove the previous control from the form's Controls collection and add the next one in its place).
    Tentacle Blog: http://www.tentaclesoftware.com/blog/
    WHS Disk Management: http://www.tentaclesoftware.com/WHSDiskManagement/
    • Marked as answer by MarkyMarc Sunday, December 21, 2008 10:33 AM
    Sunday, December 21, 2008 4:23 AM
    Moderator

All replies

  • Unfortunately, the wizardpage controls aren't as friendly as they seem; you can't just drop them on to a form and have an instant wizard :)

    Easiest way to see how Microsoft uses the controls is to crack open the Server Storage add-in with Reflector and have a dig around. Basically, they create an Array of controls and loop through them as the user clicks "next" or "back" (i.e. remove the previous control from the form's Controls collection and add the next one in its place).
    Tentacle Blog: http://www.tentaclesoftware.com/blog/
    WHS Disk Management: http://www.tentaclesoftware.com/WHSDiskManagement/
    • Marked as answer by MarkyMarc Sunday, December 21, 2008 10:33 AM
    Sunday, December 21, 2008 4:23 AM
    Moderator
  • Thank you Sam for your time.

    So basically, the pages can be created but the contiener to control the sequencing doesn't exists.
    I'll use your suggestion to go about it.
    Sunday, December 21, 2008 10:32 AM
  • If you're using reflector, you'll notice that the contents of the wizards tend to be built dynamically.  However, it is possible to create the contents of the wizard page using User Controls and the Visual Studio Designer.  This should simplify the design (and take a lot less time) of complicated wizard pages quite a bit.
    Monday, December 22, 2008 7:00 PM
  •  
    daviande said:

    However, it is possible to create the contents of the wizard page using User Controls and the Visual Studio Designer.  This should simplify the design (and take a lot less time) of complicated wizard pages quite a bit.

    Yeah, that's what I do. Building the controls using the designer is a lot faster.


    Tentacle Blog: http://www.tentaclesoftware.com/blog/
    WHS Disk Management: http://www.tentaclesoftware.com/WHSDiskManagement/
    Monday, December 22, 2008 7:13 PM
    Moderator
  • Sam, your blog with the tutorials has gone down? Any problems? Hope you fix it soon.
    Monday, December 29, 2008 10:59 AM
  •  
    Mattyg76 said:

    Sam, your blog with the tutorials has gone down? Any problems? Hope you fix it soon.


    Yes, my web host is having major DNS issues. No ETA on a fix at the moment.
    Tentacle Blog: http://www.tentaclesoftware.com/blog/
    WHS Disk Management: http://www.tentaclesoftware.com/WHSDiskManagement/
    Monday, December 29, 2008 11:40 AM
    Moderator