public void ShowPage(WizardPage c) { if (this.currentPage != null) this.Controls.Remove(this.currentPage); c.Dock = DockStyle.Fill; c.Wizard = this; this.Controls.Add(c); this.currentPage = c; }
protected override void OnShown(EventArgs e) { base.OnShown(e); foreach (Control c in this.Controls) { if (c is WizardPage) { this.currentPage = (WizardPage)c; ((WizardPage)c).Wizard = this; break; } } }