Esempio n. 1
0
        public WizardControl()
        {
            InitializeComponent();

            ViewModel = new WizardControlViewModel();
            ViewModel.ChangeStepViewModel = (id, vm) => steps[id].ChangeStepViewModel(vm);

            DataContext = ViewModel;
        }
Esempio n. 2
0
        public WizardStepContainer(WizardControlViewModel parent, int step, UserControl nestedControl)
        {
            this.parent = parent;

            InitializeComponent();

            ViewModel = new WizardStepContainerViewModel(parent, step, nestedControl.DataContext as IWizardStep);
            StepContainer.Children.Add(nestedControl);
            DataContext = ViewModel;
        }
        public WizardStepContainerViewModel(WizardControlViewModel parent, int step, IWizardStep stepViewModel)
        {
            ParentWizard       = parent;
            Step               = step;
            this.stepViewModel = stepViewModel;

            parent.PropertyChanged += (o, e) => { if (e.PropertyName.Equals("CurrentStep"))
                                                  {
                                                      OnPropertyChanged("StepVisible");
                                                  }
            };
        }