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 AuthenticateRedirectHost(DesignTimeAuthenticationViewModel authenticationViewModel) { this.InitializeComponent(); this.DataContext = authenticationViewModel; this.browser.Navigating += browser_Navigating; this.browser.Navigate(authenticationViewModel.AuthorizeUrl); }
public DesignTimeAuthenticationPage(DesignTimeAuthenticationViewModel designTimeAuthenticationViewModel) { this.InitializeComponent(); this.DataContext = designTimeAuthenticationViewModel; }