Example #1
0
        // Creates the configuration pages for the search tool
        private ObservableCollection <WizardPage> createConfigPages()
        {
            ObservableCollection <WizardPage> configPages = new ObservableCollection <WizardPage>();

            // Create the page for specifying which searches to include
            ProviderSelectionView providerView = new ProviderSelectionView()
            {
                Margin = new Thickness(10),
            };

            m_searchSelectionPage = new WizardPage()
            {
                Heading = Strings.SelectSearchTypes,
                Content = providerView
            };

            // Initialize configuration ViewModel if necessary
            if (m_configViewModel == null)
            {
                initConfigViewModel();
            }

            // Set page's data context to the ViewModel
            providerView.DataContext = m_configViewModel;

            m_searchSelectionPage.InputValid = m_configViewModel.SelectedSearchProviders.Count > 0;

            // Add the page
            configPages.Add(m_searchSelectionPage);

            // Incorporate wizard info from current search providers
            addNewWizardInfo(m_configViewModel.SelectedSearchProviders, configPages);

            return(configPages);
        }
        // Creates the configuration pages for the search tool
        private ObservableCollection<WizardPage> createConfigPages()
        {
            ObservableCollection<WizardPage> configPages = new ObservableCollection<WizardPage>();

            // Create the page for specifying which searches to include
            ProviderSelectionView providerView = new ProviderSelectionView()
            {
                Margin = new Thickness(10),
            };

            m_searchSelectionPage = new WizardPage()
            {
                Heading = Strings.SelectSearchTypes,
                Content = providerView
            };

            // Initialize configuration ViewModel if necessary
            if (m_configViewModel == null)
                initConfigViewModel();

            // Set page's data context to the ViewModel
            providerView.DataContext = m_configViewModel;

            m_searchSelectionPage.InputValid = m_configViewModel.SelectedSearchProviders.Count > 0;

            // Add the page
            configPages.Add(m_searchSelectionPage);

            // Incorporate wizard info from current search providers
            addNewWizardInfo(m_configViewModel.SelectedSearchProviders, configPages);

            return configPages;
        }