internal void DetachContent()
        {
            ModernContent content = this.Content as ModernContent;

            this.Content     = null;
            this.CommandArea = null;
            if (content.StatusBar != null)
            {
                this.StatusBar = null;
            }
            DetachedWindowHost host = new DetachedWindowHost(content.DetachedName, content, detachedWindowClosed);

            DetachedContent.Add(host, content);
            host.Owner = this;
            host.Show();
            if (host.Width < this.Width && host.Width < 1152)
            {
                host.Width = 1000;
            }
            if (host.Height < this.Height && host.Height < 800)
            {
                host.Height = 800;
            }
            this.IsContentDetached = true;
            this.Content           = contentDetached;
        }
        private void detachedWindowClosed(object sender, EventArgs e)
        {
            DetachedWindowHost host = sender as DetachedWindowHost;
            ModernContent      mc   = DetachedContent[host];

            DetachedContent.Remove(host);

            if (loadedMenu.ContentType == mc.GetType() && this.Content == contentDetached)
            {
                LoadContent(loadedMenu, out bool isLeft, out bool AnimationShown);
            }
        }