Ejemplo n.º 1
0
        /// <summary>
        /// Expands the GroupBox</summary>
        public void Expand()
        {
            if (!IsCollapsed)
            {
                return;
            }

            Expanding.Raise(this, EventArgs.Empty);

            foreach (Control child in Controls)
            {
                if (ReferenceEquals(child, m_btn))
                {
                    continue;
                }

                child.Show();
            }

            MinimumSize = new Size(m_prevMinSize.Width, m_prevMinSize.Height);

            base.Height = LastHeight;
            LastHeight  = CollapseHeight;

            IsCollapsed = false;

            Invalidate();
            m_btn.Invalidate();

            Expanded.Raise(this, EventArgs.Empty);
        }