src/Foundation/Presentation/Gimela.Presentation.Controls/Controls/MDI/MDIChild.cs
/// <summary>
/// Handles the Loaded event of the MdiChild control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
Handles the Loaded event of the MdiChild control.
Handles the Loaded event of the MdiChild control .
private void MdiChild_Loaded(object sender, RoutedEventArgs e)
    {
      FrameworkElement currentControl = this;
      while (currentControl != null && currentControl.GetType() != typeof(MDIContainer))
        currentControl = (FrameworkElement)currentControl.Parent;
      if (currentControl != null)
        Container = (MDIContainer)currentControl;
      else throw new Exception("Unable to find MdiContainer parent.");
    }
private void MdiChild_Loaded ( object sender , RoutedEventArgs e ) { FrameworkElement currentControl = this ; while ( currentControl != null && currentControl . GetType ( ) != typeof ( MDIContainer ) ) currentControl = ( FrameworkElement ) currentControl . Parent ; if ( currentControl != null ) Container = ( MDIContainer ) currentControl ; else throw new Exception ( " " ) ; }
Handles the Loaded event of the MdiChild control.
Handles the Loaded event of the MdiChild control .
sender
object
The source of the event.
The source of the event .
e
RoutedEventArgs
The  instance containing the event data.
The instance containing the event data .