src/Foundation/Presentation/Gimela.Presentation.Controls/Controls/MDI/MDIContainer.cs
/// <summary>
/// Focuses a child and brings it into view.
/// </summary>
/// <param name="mdiChild">The MDI child.</param>
Focuses a child and brings it into view.
Focuses a child and brings it into view .
internal static void Focus(MDIChild mdiChild)
    {
      if (mdiChild == null)
        return;
      mdiChild.Container._buttonsBorder.Child = mdiChild.Buttons;
      int maxZindex = 0;
      for (int i = 0; i < mdiChild.Container.Children.Count; i++)
      {
        int zindex = Panel.GetZIndex(mdiChild.Container.Children[i]);
        if (zindex > maxZindex)
          maxZindex = zindex;
        if (mdiChild.Container.Children[i] != mdiChild)
        {
          mdiChild.Container.Children[i].Focused = false;
        }
        else
          mdiChild.Focused = true;
      }
      Panel.SetZIndex(mdiChild, maxZindex + 1);
    }
internal static void Focus ( MDIChild mdiChild ) { if ( mdiChild == null ) return ; mdiChild . Container . _buttonsBorder . Child = mdiChild . Buttons ; int maxZindex = 0 ; for ( int i = 0 ; i < mdiChild . Container . Children . Count ; i ++ ) { int zindex = Panel . GetZIndex ( mdiChild . Container . Children [ i ] ) ; if ( zindex > maxZindex ) maxZindex = zindex ; if ( mdiChild . Container . Children [ i ] != mdiChild ) { mdiChild . Container . Children [ i ] . Focused = false ; } else mdiChild . Focused = true ; } Panel . SetZIndex ( mdiChild , maxZindex + 1 ) ; }
Focuses a child and brings it into view.
Focuses a child and brings it into view .
mdiChild
MDIChild
The MDI child.
The MDI child .