src/GenFx.Wpf/Controls/PopulationSelector.xaml.cs
/// <summary>
/// Handles the event when the <see cref="SelectedPopulationIndex"/> property changes.
/// </summary>
/// <param name="obj">The <see cref="DependencyObject"/> that owns the property.</param>
/// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> associated with the event.</param>
Handles the event when the  property changes.
Handles the event when the property changes .
private static void OnSelectedPopulationIndexChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            PopulationSelector selector = (PopulationSelector)obj;
            int index = (int)e.NewValue;
            if (selector.Environment == null || index < 0 || index >= selector.Environment.Populations.Count)
            {
                selector.SelectedPopulation = null;
            }
            else
            {
                selector.SelectedPopulation = selector.Environment.Populations[(int)e.NewValue];
            }
        }
private static void OnSelectedPopulationIndexChanged ( DependencyObject obj , DependencyPropertyChangedEventArgs e ) { PopulationSelector selector = ( PopulationSelector ) obj ; int index = ( int ) e . NewValue ; if ( selector . Environment == null || index < 0 || index >= selector . Environment . Populations . Count ) { selector . SelectedPopulation = null ; } else { selector . SelectedPopulation = selector . Environment . Populations [ ( int ) e . NewValue ] ; } }
Handles the event when the  property changes.
Handles the event when the property changes .
obj
DependencyObject
The  that owns the property.
The that owns the property .
e
DependencyPropertyChangedEventArgs
The  associated with the event.
The associated with the event .