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; }
public WizardViewModel(Wizard wizard) { _wizard = wizard; NextCommand = new RelayCommand(MoveToNextPage, CanMoveToNextPage); PreviousCommand = new RelayCommand(MoveToPreviousPage, CanMoveToPreviousPage); FinishCommand = new RelayCommand(Finish, o=>true); RefreshWizardPageViewModel(); }