示例#1
0
        /// <summary>
        /// Activate the document showing its header if it's not visible
        /// </summary>
        public override void Activate()
        {
            base.Activate();

            if (!DocumentTabPanel.GetIsHeaderVisible(this))
            {
                DocumentPane parentPane = this.ContainerPane as DocumentPane;
                if (parentPane != null &&
                    parentPane.GetManager() != null &&
                    parentPane.Items.IndexOf(this) != 0)
                {
                    parentPane.Items.Remove(this);
                    parentPane.Items.Insert(0, this);
                    parentPane.SelectedIndex = 0;
                }
            }

            //Active this content as the active document
            if (Manager != null)
            {
                Manager.ActiveDocument = this;
            }

            //ensure this content is rendered first
            Panel.SetZIndex(this, 2);
        }
示例#2
0
 public override void Activate()
 {
     if (State == DockableContentState.AutoHide)
     {
         if (Manager != null && this.IsLoaded)
         {
             Manager.ShowFlyoutWindow(this, null);
         }
     }
     else if (State == DockableContentState.Document)
     {
         if (!DocumentTabPanel.GetIsHeaderVisible(this))
         {
             DocumentPane parentPane = this.ContainerPane as DocumentPane;
             if (parentPane != null &&
                 parentPane.GetManager() != null &&
                 parentPane.Items.IndexOf(this) != 0)
             {
                 parentPane.Items.Remove(this);
                 parentPane.Items.Insert(0, this);
                 parentPane.SelectedIndex = 0;
             }
         }
     }
     base.Activate();
 }