﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Dynamically insert wizard pages at runtime</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 03:12:59 GMT</lastBuildDate><ttl>20</ttl><item><title>Dynamically insert wizard pages at runtime</title><link>http://forum.strataframe.net/FindPost2151.aspx</link><description>I'm trying to create a prototype for an application we're designing.  I'm thinking of using the Wizardcontrol heavily.  However, there will be a lot of need for conditionally/dynamically inserting/removing pages based on previous wizard steps.  Can you give me a quick tutorial on this?  I looked at the SampleWizard form in the UIControlsSample download and I saw this capability mentioned but could not find an example.  Thanks in advance.&lt;br&gt;
&lt;br&gt;
- Randy</description><pubDate>Thu, 17 Aug 2006 08:53:49 GMT</pubDate><dc:creator>Randy Jean</dc:creator></item><item><title>RE: Dynamically insert wizard pages at runtime</title><link>http://forum.strataframe.net/FindPost2219.aspx</link><description>We've been able to reproduce the problem and are working on a fix, Jean.&amp;nbsp; We'll make sure the fix makes it into the next version.</description><pubDate>Thu, 17 Aug 2006 08:53:49 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Dynamically insert wizard pages at runtime</title><link>http://forum.strataframe.net/FindPost2175.aspx</link><description>You can insert a blank page after your "real" last page.&amp;nbsp; Just handle the NextClicked event and prevent it from going to that page.&amp;nbsp; The control inheriantly disallows end-users from "hurting" themselves by automatically taking account of the last page.&amp;nbsp; Another option&amp;nbsp;is to just change the text of the finish button.&amp;nbsp; You can also set the "ShowFinishButtonAsDistinctButton" property to false.&amp;nbsp; This way the Next and finish buttons share the same space and will never be disabled.</description><pubDate>Fri, 11 Aug 2006 19:01:48 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Dynamically insert wizard pages at runtime</title><link>http://forum.strataframe.net/FindPost2174.aspx</link><description>Another wizard question:&lt;br&gt;
Is there a way to force the Next button to be enabled even though it "thinks" it's on the last page.  I tried &lt;br&gt;
&lt;br&gt;
Me.WizardControl1.SetNavigationButtonStatus(WizardNavigationButtons.Next,WizardNavigationButtonStatus.Enabled)&lt;br&gt;
&lt;br&gt;
in the PageActivate of the last page but it continued to be disabled.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Randy</description><pubDate>Fri, 11 Aug 2006 17:00:37 GMT</pubDate><dc:creator>Randy Jean</dc:creator></item><item><title>RE: Dynamically insert wizard pages at runtime</title><link>http://forum.strataframe.net/FindPost2164.aspx</link><description>Thanks for the heads up... I'll check it out.</description><pubDate>Fri, 11 Aug 2006 15:49:34 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Dynamically insert wizard pages at runtime</title><link>http://forum.strataframe.net/FindPost2161.aspx</link><description>[quote][b]Trent L. Taylor (08/10/2006)[/b][hr]To create a classable page, create a new item through the solution explorer and choose the SF Wizard Page template.[/quote]&lt;br&gt;
&lt;br&gt;
When I try this I get "Object Reference Not set to an instance of an object" when I try to view in the visual designer.</description><pubDate>Fri, 11 Aug 2006 14:17:54 GMT</pubDate><dc:creator>Randy Jean</dc:creator></item><item><title>RE: Dynamically insert wizard pages at runtime</title><link>http://forum.strataframe.net/FindPost2157.aspx</link><description>Thanks. Yeah, this is a powerful set of classes.  Bet you guys had fun creating this :D</description><pubDate>Fri, 11 Aug 2006 10:19:18 GMT</pubDate><dc:creator>Randy Jean</dc:creator></item><item><title>RE: Dynamically insert wizard pages at runtime</title><link>http://forum.strataframe.net/FindPost2155.aspx</link><description>Randy,&lt;P&gt;There&amp;nbsp;are a lot of things that can be done with the Wizard control and it is designed to make adding pages and inserting pages very easy, both within the designer and at run-time.&amp;nbsp; The first thing you need to learn about is the control designer (shown in the image below).&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/d1728be3-057f-42dc-b60f-dd46.jpg"&gt;&lt;/P&gt;&lt;P&gt;This is opened using the little arrow at the top right of the control when selected.&amp;nbsp; In addition to creating a page on a form, you can create a page class which can then be added by selecting the "Existing Page" option.&amp;nbsp; To create a classable page, create a new item through the solution explorer and choose the SF Wizard Page template.&lt;/P&gt;&lt;P&gt;There are a number of functions on a wizard control to change the state of buttons and dynamically insert pages.&amp;nbsp; The first thing to learn about is the PageCollection property which houses all of the pages.&amp;nbsp; You can programmatically Add, Remove, and Insert pages.&amp;nbsp; This is just a collection and has all features as such.&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;.WizardControl1.PageCollection.Add(MyPage)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.WizardControl1.PageCollection.Insert(2, MyPage)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;There are other methods to control the button states programmatically.&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;.WizardControl1.SetNavigationButtonStatus(WizardNavigationButtons.Next,WizardNavigationButtonStatus.Enabled)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;In addition to all of the methods and properties that can be set, there are events on both a page and on the wizard control itself.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Page Events&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT size=2&gt;BackClicked&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size=2&gt;NextClicked&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size=2&gt;PageActivated&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Wizard Control Events&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;BackClicked&lt;/LI&gt;&lt;LI&gt;CancelClicked&lt;/LI&gt;&lt;LI&gt;NextClicked&lt;/LI&gt;&lt;LI&gt;FinishClicked&lt;/LI&gt;&lt;LI&gt;NextClicked&lt;/LI&gt;&lt;LI&gt;PageActivated&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This is just a basic overview.&amp;nbsp; But the best thing is to create a project and play with the properties and page settings.&amp;nbsp; There is also a sample in the Samples and Solutions section of the forum that has a wizard example within it.&amp;nbsp; It is the UI Control sample. &lt;A href="http://forum.strataframe.net/Topic1988-17-1.aspx"&gt;http://forum.strataframe.net/Topic1988-17-1.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope this gets you started.&amp;nbsp; Let me know if you have more questions.&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Thu, 10 Aug 2006 21:48:40 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>