Microsoft.WizardFramework.dll


Have you ever found your self wandering sleepless around in this directory here :

"C:Program FilesCommon FilesMicrosoft SharedHelp 8" and stumbled over this assembly here:
Microsoft.WizardFramework.dll

Yeah right that's the .Net 2.0 Wizard framework, its not documented yet, so Reflector.exe is your best option here (as usual).

Here is how I got a descent Wizard to work:
Create an 'inherited Form' that derives from the WizardForm like this:

 public partial class WizardFrm : Microsoft.WizardFramework.WizardForm
 {
 .....
 
Create some wizard pages, this is best done by creating an 'Inherited User Control' which derives from WizardPage like this:

public partial class Page1 : Microsoft.WizardFramework.WizardPage
{
        public Page1(WizardForm wizard):base(wizard)
        {
            InitializeComponent();
        }
.....

Now in the WizardFrm's ctor add your WizardPages like this:

public WizardFrm()
{
      InitializeComponent();
      p1 = new Page1(this);
      this.AddPage(p1);
      p2 = new Page2(this);
      this.AddPage(p2);
      p3 = new Page3(this);
      this.AddPage(p3);
}
´
private void WizardFrm_Load(object sender, EventArgs e)
{
      EnableButton(ButtonType.Next, true);
}


Invoke your wizard from in your app like this :

WizardFrm frm = new WizardFrm();
frm.Start();

Now when you design the individual WizardPages set the 'infoPanel.Dock' to Fill, this will let you add your controls to the wizard page. Set the WizardPage.StepTitle to a description that this WizardPage represents.

I was not able to find any Events like OnNext, OnPrev etc. This makes it hard to validate a WizardPage there by defeating the whole purpose of a Wizard...I am sure that deep down in the WizardForm or in the 'NavigationButtonBar' its possible to catch these events ...I didn't proceed that far for now.

I wonder why this WizardFramework isn't documented, I sure do hope they make it official ...I have been missing that Wizard since the good old MFC days.

contact me if you need the sourcecode.

"One of the secrets of life is to make stepping stones out of stumbling blocks"
-- Jack Penn

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值