Unplanned
Last Updated: 30 Mar 2016 14:33 by ADMIN
ADMIN
Jack
Created on: 21 Oct 2011 05:15
Category:
Type: Bug Report
1
FIX. RadPanel - does not behave the same way as MS WinForms Panel when sizing
When RadPanel is set to AutoSize, it should update its size automatically when changing the visibility of some control inside it.

Workaround:
 public class CustomRadPanel : RadPanel
    {
        public override string ThemeClassName
        {
            get
            {
                return typeof(RadPanel).FullName;
            }
            set
            {
                base.ThemeClassName = value;
            }
        }

        protected override void OnLayout(LayoutEventArgs e)
        {
            base.OnLayout(e);
            int maxHeight = 0;
            foreach (Control control in this.Controls)
            {
                if (control.Visible)
                {
                    maxHeight = Math.Max(control.Height, maxHeight);
                }
            }
            this.AutoSize = false;
            this.Height = maxHeight;
        }
    }
0 comments