src/GenFx.Wpf/Controls/PopulationSelector.xaml.cs
/// <summary>
/// Sets the <see cref="SelectedPopulation"/> if it hasn't yet been initialized.
/// </summary>
Sets the  if it hasn't yet been initialized.
Sets the if it hasn ' t yet been initialized .
private void TryInitializeSelectedPopulation()
        {
            if (!this.isSelectedPopulationInitialized)
            {
                if (this.Environment.Populations.Any())
                {
                    if (this.SelectedPopulationIndex < 0)
                    {
                        this.SelectedPopulationIndex = 0;
                    }
                    else
                    {
                        this.SelectedPopulation = this.Environment.Populations[this.SelectedPopulationIndex];
                    }
                    this.isSelectedPopulationInitialized = true;
                }
            }
        }
private void TryInitializeSelectedPopulation ( ) { if ( ! this . isSelectedPopulationInitialized ) { if ( this . Environment . Populations . Any ( ) ) { if ( this . SelectedPopulationIndex < 0 ) { this . SelectedPopulationIndex = 0 ; } else { this . SelectedPopulation = this . Environment . Populations [ this . SelectedPopulationIndex ] ; } this . isSelectedPopulationInitialized = true ; } } }
Sets the  if it hasn't yet been initialized.
Sets the if it hasn ' t yet been initialized .
// This will implicitly set the SelectedPopulation