ComponentFactory.Krypton.Docking.KryptonDockingFloating.OnDockingFloatingWindowDisposed C# (CSharp) Method

OnDockingFloatingWindowDisposed() private method

private OnDockingFloatingWindowDisposed ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void OnDockingFloatingWindowDisposed(object sender, EventArgs e)
        {
            // Cast to correct type and unhook event handlers so garbage collection can occur
            KryptonDockingFloatingWindow floatingWindowElement = (KryptonDockingFloatingWindow)sender;
            floatingWindowElement.Disposed -= new EventHandler(OnDockingFloatingWindowDisposed);

            // Remove the elemenet from our child collection as it is no longer valid
            InternalRemove(floatingWindowElement);
        }