private void InitializePages()
        {
            this.designTimeAuthenticationViewModel = new DesignTimeAuthenticationViewModel();
            this.designTimeAuthenticationViewModel.PageLeaving += DesignTimeAuthenticationViewModel_PageLeaving;
            this.runtimeAuthenticationTypeViewModel = new RuntimeAuthenticationTypeViewModel();
            this.runtimeAuthenticationConfigViewModel = new RuntimeAuthenticationConfigViewModel(
                () => this.designTimeAuthenticationViewModel.Authentication?.MyDomain);
            this.runtimeAuthenticationConfigViewModel.RuntimeAuthStrategy = this.runtimeAuthenticationTypeViewModel.RuntimeAuthStrategy;
            this.objectSelectionViewModel = new ObjectSelectionViewModel();

            this.Pages.Add(this.designTimeAuthenticationViewModel);
            this.Pages.Add(this.runtimeAuthenticationTypeViewModel);
            this.Pages.Add(this.runtimeAuthenticationConfigViewModel);
            this.Pages.Add(this.objectSelectionViewModel);

            // Some logic within the view models depend on the Wizard.  This logic must be invoked after the pages have
            // been added to the wizard in order for the Wizard property to be available on the ConnectedServiceWizardPage.
            if (this.Context.IsUpdating)
            {
                this.RestoreAuthenticationSettings();
            }

            foreach (SalesforceConnectedServiceWizardPage page in this.Pages)
            {
                page.PropertyChanged += this.PageViewModel_PropertyChanged;
            }
        }
 public void TrackWizardFinishedEvent(SalesforceConnectedServiceInstance salesforceInstance, ObjectSelectionViewModel objectSelectionViewModel)
 {
     this.TrackEvent(
         TelemetryHelper.WizardFinishedEventName,
         salesforceInstance,
         null,
         (measurements) => measurements.Add(TelemetryHelper.ObjectAvailableCountDataName, objectSelectionViewModel.GetAvailableObjectCount()));
 }
        public ObjectSelectionPage(ObjectSelectionViewModel objectSelectionViewModel)
        {
            InitializeComponent();

            this.DataContext = objectSelectionViewModel;
        }