src/Foundation/Presentation/Gimela.Presentation.Controls/Controls/MDI/MDIContainer.cs
/// <summary>
/// Handles the SizeChanged event of the MdiContainer control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.Windows.SizeChangedEventArgs"/> instance containing the event data.</param>
Handles the SizeChanged event of the MdiContainer control.
Handles the SizeChanged event of the MdiContainer control .
private void MdiContainer_SizeChanged(object sender, SizeChangedEventArgs e)
    {
      if (Children.Count == 0)
        return;
      for (int i = 0; i < Children.Count; i++)
      {
        MDIChild mdiChild = Children[i];
        if (mdiChild.WindowState == WindowState.Maximized)
        {
          mdiChild.Width = ActualWidth;
          mdiChild.Height = ActualHeight;
        }
        if (mdiChild.WindowState == WindowState.Minimized)
        {
          mdiChild.Position = new Point(mdiChild.Position.X, mdiChild.Position.Y + e.NewSize.Height - e.PreviousSize.Height);
        }
      }
    }
private void MdiContainer_SizeChanged ( object sender , SizeChangedEventArgs e ) { if ( Children . Count == 0 ) return ; for ( int i = 0 ; i < Children . Count ; i ++ ) { MDIChild mdiChild = Children [ i ] ; if ( mdiChild . WindowState == WindowState . Maximized ) { mdiChild . Width = ActualWidth ; mdiChild . Height = ActualHeight ; } if ( mdiChild . WindowState == WindowState . Minimized ) { mdiChild . Position = new Point ( mdiChild . Position . X , mdiChild . Position . Y + e . NewSize . Height - e . PreviousSize . Height ) ; } } }
Handles the SizeChanged event of the MdiContainer control.
Handles the SizeChanged event of the MdiContainer control .
sender
object
The source of the event.
The source of the event .
e
SizeChangedEventArgs
The  instance containing the event data.
The instance containing the event data .