Wizard Default Page

Nov 15, 2012 at 3:46 AM
Edited Nov 15, 2012 at 3:47 AM

I have a wizard in a popup: (JobWizardControl is a Wizard)

if user navigates to page 2 of the wizard and close the popup, when they open the popup again, it starts at page 2 instead of page 1(the beginning page of the wizard).

is there anyway that when user open the popup and navigate to page 2 ,close the popup and re-open the popup, it goes to page 1(the beginning page of the wizard)? Thanks heaps.


    <extToolkit:ChildWindow IsModal="True" WindowStartupLocation="Center" common:DesignModeTool.IsHidden="True"
                                WindowState="{Binding Path=ShowWizardDetailView,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                <Label Content="Create New Job" FontSize="14" FontWeight="Bold"/>
            <infWizard:JobWizardControl />

Nov 15, 2012 at 12:43 PM

You can set the wizard's current page to be the first one when the window opens.

if Wizard is defined in a Resources :

Xceed.Wpf.Toolkit.Wizard wizard = Resources[ "_wizard" ] as Xceed.Wpf.Toolkit.Wizard;
if( wizard != null )
    wizard.CurrentPage = wizard.Items[ 0 ] as Xceed.Wpf.Toolkit.WizardPage;

Nov 15, 2012 at 7:18 PM
Edited Nov 15, 2012 at 7:19 PM

Thanks BoucherS. I am Usinv MVVM. HOw do I bind my wizard to the VIew Model? 
        <extToolkit:Wizard Name="WizardShell" FinishButtonClosesWindow="False" CancelButtonClosesWindow="False" CanHelp="False"  >
            <extToolkit:WizardPage x:Name="Page0" PageType="Interior" Description="1 - Number of containers to be pickup." >
                    <wizard:ContainerWizardPage />

            <extToolkit:WizardPage x:Name="Page1" PageType="Interior"
                                   Description="2 - Select Pickup and Delivery Locations."
                                   CanSelectNextPage="{Binding Path=CanNextPage1}"
                                   NextPage="{Binding ElementName=Page2}" 
                                   PreviousPage="{Binding ElementName=Page0}">