private void UpdateButtons(WizardStep step)
        {
            buttonBar.Children.Clear();

            foreach (var buttonDescriptor in step.Buttons)
            {
                var descriptor = buttonDescriptor;

                var btn = new Button();
                btn.Content = buttonDescriptor.Text;
                btn.IsEnabled = buttonDescriptor.CanExecute;
                btn.Click += (_, __) => descriptor.Exetute();

                buttonBar.Children.Add(btn);
            }

            backBtn.IsEnabled = step.BackButton.CanExecute;
        }
        private void UpdateButtons(WizardStep step)
        {
            buttonBar.Children.Clear();

            foreach (var buttonDescriptor in step.Buttons)
            {
                var descriptor = buttonDescriptor;

                var btn = new Button();
                btn.Content   = buttonDescriptor.Text;
                btn.IsEnabled = buttonDescriptor.CanExecute;
                btn.Click    += (_, __) => descriptor.Exetute();

                buttonBar.Children.Add(btn);
            }

            backBtn.IsEnabled = step.BackButton.CanExecute;
        }
 private void SetStep(WizardStep step)
 {
     UpdateButtons(step);
     contentFrame.Navigate(step.Page);
 }
 public WizardWindow(string title, WizardStep initialStep)
 {
     InitializeComponent();
     Title = title;
     SetStep(initialStep);
 }
Beispiel #5
0
 public NextStepEventArgs(WizardStep nextStep)
 {
     NextStep = nextStep;
 }
 private void SetStep(WizardStep step)
 {
     UpdateButtons(step);
     contentFrame.Navigate(step.Page);
 }
 public WizardWindow(string title, WizardStep initialStep)
 {
     InitializeComponent();
     Title = title;
     SetStep(initialStep);
 }
 public NextStepEventArgs(WizardStep nextStep)
 {
     NextStep = nextStep;
 }