示例#1
0
 protected virtual void OnPanelCollapsing(object sender, XPanderStateChangeEventArgs e)
 {
     if (this.PanelCollapsing != null)
     {
         this.PanelCollapsing(sender, e);
     }
 }
示例#2
0
 protected override void OnPanelCollapsing(object sender, XPanderStateChangeEventArgs e)
 {
     if (Dock == DockStyle.Left || Dock == DockStyle.Right)
     {
         foreach (Control control in base.Controls)
         {
             control.Hide();
         }
     }
     if (Dock == DockStyle.Left || Dock == DockStyle.Right)
     {
         if (base.ClientRectangle.Width > base.CaptionHeight)
         {
             m_restoreBounds = base.ClientRectangle;
         }
         base.Width = base.CaptionHeight;
     }
     if (Dock == DockStyle.Top || Dock == DockStyle.Bottom)
     {
         if (base.ClientRectangle.Height > base.CaptionHeight)
         {
             m_restoreBounds = base.ClientRectangle;
         }
         base.Height = base.CaptionHeight;
     }
     base.OnPanelCollapsing(sender, e);
 }
示例#3
0
        protected override void OnPanelExpanding(object sender, XPanderStateChangeEventArgs e)
        {
            bool expand = e.Expand;

            if (expand)
            {
                Expand = expand;
                Invalidate(invalidateChildren: false);
            }
            base.OnPanelExpanding(sender, e);
        }
示例#4
0
 protected override void OnPanelExpanding(object sender, XPanderStateChangeEventArgs e)
 {
     if (Dock == DockStyle.Left || Dock == DockStyle.Right)
     {
         foreach (Control control in base.Controls)
         {
             control.Show();
         }
         if (base.ClientRectangle.Width == base.CaptionHeight)
         {
             base.Width = m_restoreBounds.Width;
         }
     }
     if (Dock == DockStyle.Top || Dock == DockStyle.Bottom)
     {
         base.Height = m_restoreBounds.Height;
     }
     base.OnPanelExpanding(sender, e);
 }