Completed
Last Updated: 01 Sep 2020 13:11 by ADMIN
Release R3 2020
Artem
Created on: 17 Aug 2020 08:43
Category: DateTimePicker
Type: Bug Report
0
RadDateTimePicker: Setting min/max size of the drop down doesn't allow decreasing the height less than the DropDownMaxSize's height

Please use the following code snippet. The user should be allowed to resize the drop down within the specified range as it is illustrated in the gif file:

            RadDateTimePickerCalendar calBehavior = this.radDateTimePicker1.DateTimePickerElement.CurrentBehavior as RadDateTimePickerCalendar;
            calBehavior.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
            calBehavior.DropDownMinSize = new Size(400, 400);
            calBehavior.DropDownMaxSize = new Size(600, 600);

Currently, the user is allowed to shrink the width, but not the height.

Workaround:

        public RadForm1()
        {
            InitializeComponent();
            //this.radDateTimePicker1.CalendarSize = new Size(500, 500);


            
            RadDateTimePickerCalendar calBehavior = this.radDateTimePicker1.DateTimePickerElement.CurrentBehavior as RadDateTimePickerCalendar;
            calBehavior.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
            calBehavior.DropDownMinSize = new Size(400, 400);
            calBehavior.DropDownMaxSize = new Size(600, 600);

           this.radDateTimePicker1.Opened+=radDateTimePicker1_Opened;
        }

        private void radDateTimePicker1_Opened(object sender, EventArgs e)
        {
            RadDateTimePickerCalendar calBehavior = this.radDateTimePicker1.DateTimePickerElement.CurrentBehavior as RadDateTimePickerCalendar;
            calBehavior.PopupControl.MinimumSize= calBehavior.DropDownMinSize;
        }

Attached Files:
1 comment
Artem
Posted on: 17 Aug 2020 12:58
That works!
Thank you!