src/Foundation/Presentation/Gimela.Presentation.Controls/Controls/MDI/MDIContainer.cs
/// <summary>
/// Handles the Activated event of the MdiContainer control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
Handles the Activated event of the MdiContainer control.
Handles the Activated event of the MdiContainer control .
private void MdiContainer_Activated(object sender, EventArgs e)
    {
      if (Children.Count == 0)
        return;
      int index = 0, maxZindex = Panel.GetZIndex(Children[0]);
      for (int i = 0; i < Children.Count; i++)
      {
        int zindex = Panel.GetZIndex(Children[i]);
        if (zindex > maxZindex)
        {
          maxZindex = zindex;
          index = i;
        }
      }
      Children[index].Focused = true;
    }
private void MdiContainer_Activated ( object sender , EventArgs e ) { if ( Children . Count == 0 ) return ; int index = 0 , maxZindex = Panel . GetZIndex ( Children [ 0 ] ) ; for ( int i = 0 ; i < Children . Count ; i ++ ) { int zindex = Panel . GetZIndex ( Children [ i ] ) ; if ( zindex > maxZindex ) { maxZindex = zindex ; index = i ; } } Children [ index ] . Focused = true ; }
Handles the Activated event of the MdiContainer control.
Handles the Activated event of the MdiContainer control .
sender
object
The source of the event.
The source of the event .
e
EventArgs
The  instance containing the event data.
The instance containing the event data .