src/GenFx.Wpf/Controls/PopulationViewer.xaml.cs
/// <summary>
/// Handles the event when the <see cref="ExecutionState"/> 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 OnExecutionStateChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            PopulationViewer viewer = (PopulationViewer)obj;
            ExecutionState newState = (ExecutionState)e.NewValue;
            ExecutionState oldState = (ExecutionState)e.OldValue;
            if (newState == ExecutionState.Idle && oldState == ExecutionState.Paused)
            {
                return;
            }
            viewer.RefreshEntities(viewer.Population, newState);
        }
private static void OnExecutionStateChanged ( DependencyObject obj , DependencyPropertyChangedEventArgs e ) { PopulationViewer viewer = ( PopulationViewer ) obj ; ExecutionState newState = ( ExecutionState ) e . NewValue ; ExecutionState oldState = ( ExecutionState ) e . OldValue ; if ( newState == ExecutionState . Idle && oldState == ExecutionState . Paused ) { return ; } viewer . RefreshEntities ( viewer . Population , newState ) ; }
Handles the event when the  property changes.
Handles the event when the property changes .
// No need to refresh if we're moving from paused to idle since no change to the entities would have occurred.
obj
DependencyObject
The  that owns the property.
The that owns the property .
e
DependencyPropertyChangedEventArgs
The  associated with the event.
The associated with the event .