ComponentOne Wizard for ASP.NET WebForms
Task-Based Help / Autoplaying the Steps of a C1Wizard
In This Topic
    Autoplaying the Steps of a C1Wizard
    In This Topic

    By setting a single property, you can make the C1Wizard control automatically navigate between steps. You can also customize autoplay by setting the delay between transitions. This topic will show you how to set autoplay and customize the delay time between page views in Design view, in Source view, and in code.

    In Design View

    To set up auto play, complete the following steps:

    1. Click C1Wizards smart tag Description: D:\Whidbey\T211\Projects - ASP Wijmo\Wijmo_C1Wizard\Word Documents\CommonGraphics\SmartTag.png  to open the C1Wizard Tasks menu and select Wizard Designer.

      The C1Wizard Designer Form opens.

    2. In treeview, select C1Wizard1 to its list of properties and set the following. 

      • Set the AutoPlay property to True.
      • Set the Delay property. For this example, we are going to set it to "1500" milliseconds so that 1.5 seconds will pass before the page will switch.

      Note: By default, the playthrough will end at the last step in the control. If you'd like the C1Wizard|tag=C1Wizard_Class control to continue cycling automatically through pages after one run-through, you can you can also set the Loop|tag=Loop_Property property to True.

    3. Press OK to close the designer and then press F5 run the project.  Observe that the steps of the control are played through automatically.

    In Source View

    Complete the following steps:

    1. To set up AutoPlay in Source view, add AutoPlay="True" and "Delay="1500" to the <cc1:C1Wizard> tag.  Your HTML should resemble the following:
      <cc1:C1Wizard ID="C1Wizard1" runat="server" Height="250px"  Width="300px" AutoPlay="True" Delay="1500">
      

      Note: By default, the playthrough will end at the last step in the control. If you'd like the C1Wizard control to continue cycling automatically through pages after one run-through, you can add Loop=True to the control's tags.

    2. Run the program and observe that the steps of the control are played through automatically.

    In Code View

    Complete the following steps:

    1. Set the AutoPlay and Delay properties by adding the following code to your Page_Load event:

      To write code in Visual Basic

      Visual Basic
      Copy Code
      C1Wizard1.AutoPlay = True
      C1Wizard1.Delay = 1500
      

      To write code in C#

      C#
      Copy Code
      C1Wizard1.AutoPlay = true;
      C1Wizard1.Delay = 1500;
      

      Note: By default, the playthrough will end at the last step in the control. If you'd like the C1Wizard control to continue cycling automatically through pages after one run-through, you can you can also set the Loop property to True.

    2. Run the program and observe that the steps of the control are played through automatically.

    See Also