예제 #1
0
 public WizardWindow(Wizard wizard)
 {
     InitializeComponent();
     Title = wizard.Title; // easiest way to set this as a XAML binding doesn't work
     DataContext = new WizardViewModel(wizard);
     wizard.Finished += (s, e) => DialogResult = true;
 }
예제 #2
0
        public WizardViewModel(Wizard wizard)
        {
            _wizard = wizard;
            NextCommand = new RelayCommand(MoveToNextPage, CanMoveToNextPage);
            PreviousCommand = new RelayCommand(MoveToPreviousPage, CanMoveToPreviousPage);
            FinishCommand = new RelayCommand(Finish, o=>true);

            RefreshWizardPageViewModel();
        }