protected virtual WizardNavigationButton CreateFinishButton(IWizard wizard)
        {
            var button = new WizardNavigationButton
            {
                Content            = _languageService.GetString("Wizard_Finish"),
                IsVisibleEvaluator = () => wizard.IsLastPage(),
                Command            = new TaskCommand(async() =>
                {
                    await wizard.ResumeAsync();
                },
                                                     () =>
                {
                    if (!wizard.HandleNavigationStates)
                    {
                        return(true);
                    }

                    if (!Wizard.CanResume)
                    {
                        return(false);
                    }

                    // Don't validate
                    var validationSummary = wizard.GetValidationContextForCurrentPage(false);
                    if (!validationSummary.HasErrors)
                    {
                        return(true);
                    }

                    return(false);
                })
            };

            return(button);
        }
        protected virtual WizardNavigationButton CreateFinishButton(IWizard wizard)
        {
            var button = new WizardNavigationButton
            {
                Content            = _languageService.GetString("Wizard_Finish"),
                IsVisibleEvaluator = () => wizard.IsLastPage(),
                StyleEvaluator     = (x) =>
                {
                    var styleName = wizard.IsLastPage() ? "WizardNavigationPrimaryButtonStyle" : "WizardNavigationButtonStyle";

                    var application = System.Windows.Application.Current;
                    return(application?.TryFindResource(styleName) as Style);
                },
                Command = new TaskCommand(async() =>
                {
                    await wizard.ResumeAsync();
                },
                                          () =>
                {
                    if (!wizard.HandleNavigationStates)
                    {
                        return(true);
                    }

                    if (!Wizard.CanResume)
                    {
                        return(false);
                    }

                    // Don't validate
                    var validationSummary = wizard.GetValidationContextForCurrentPage(false);
                    if (!validationSummary.HasErrors)
                    {
                        return(true);
                    }

                    return(false);
                })
            };

            return(button);
        }