Which wizard control can I use in a WinForms appli

2019-02-08 12:55发布

问题:

I was looking for scenario-like wizard (with Next/Back buttons) that I can use in a Windows application under .NET 3.5. Is there any wizard control provided by Microsoft in .NET Framework 3.5?

回答1:

No, Microsoft does not provide a ready-made wizard control as part of the .NET Framework. You will need to build your own.

There are several samples available on the web that can help get you started:

  • Cristi Potlog's Wizard Control for .NET  (probably my favorite out of these)
  • A Simple Wizard Control for .Net 2.0 with Full Designer Support
  • GN Wizard Framework
  • A .NET Wizard control
  • Designer centric Wizard control
  • TSWizard - a wizard framework for .NET


Of course, as you can see, the majority of those samples implement the old Wizard 97 interface, rather than the new Aero Wizards (found in Windows Vista and 7). I've seen one of those on Code Project, too:

  • Aero Wizard in VB.NET

But perhaps the best implementation I've seen is found in the Windows Forms Aero library, available for download here on CodePlex. The Aero Wizard .NET Library is another great option, also on CodePlex.

Both of those are great looking, well-designed wizard controls, but neither of them will work properly on Windows XP (which doesn't support the Aero theme). The biggest problem you'll run into is ensuring that your implementation is fully backward-compatible, properly reverting to the Wizard 97 style when running on a version of Windows prior to Vista. I haven't seen a control that gets this right posted online yet.


If spending money on a third-party control is an option, you might look into XtraWizard by Devexpress or the Wizard Framework by Divelements.


But no matter which route you choose, I highly recommend following Microsoft's Wizard guidelines.