private void CreateView() { _viewmodel = new WizardViewModel<OrderProcessFlow>(); _viewmodel.WizardCancel += new EventHandler(WizardReset); _viewmodel.WizardFinish += new EventHandler(WizardReset); _viewmodel.ProvideSteps(CreateRouteChangingSteps(_viewmodel.BusinessObject)); WizardView view = new WizardView() { DataContext = _viewmodel }; wizardHost.Content = view; }
private static WizardView GetPlainWizardView() { /// 1) /// Create a WizardViewModel passing the type of the object the wizard will model. /// The type it's modeling must have parameterless constructor; WizardViewModel will create it. var wizModel = new WizardViewModel <MonoberryProjectObject>(); /// 2) /// Create / provide the steps for the wizard. See comments in the CreateSteps method. wizModel.ProvideSteps(CreateMonoberryProjectSteps(wizModel.BusinessObject)); /// 3) /// Create the actual wizard view / control. Set it's DataContext to the WizardViewModel object created above. return(new WizardView() { Height = 400, Width = 600, DataContext = wizModel }); }