Hello.
I have a problem with the size of DropDown on high DPI. Long story short - it completely ignore DefaultItemsCountInDropDown and MaxDropDownItems.
And it works fine on 100% DPI. But when I change DPI settings in the system the pop-up height is greater than it should be and have empty space if DDL has less then 6 items. And It will show scrollbar if it has more then 6 items.
using
System.ComponentModel;
using
System.Drawing;
using
System.Windows.Forms;
using
Telerik.WinControls;
using
Telerik.WinControls.UI;
namespace
PP.DesignExamples.BugsForTelerik
{
public
class
Form4 : RadForm
{
private
RadDropDownList radDropDownList1;
private
RadDropDownList radDropDownList2;
public
Form4()
{
InitializeComponent();
}
private
void
InitializeComponent()
{
RadListDataItem radListDataItem1 =
new
RadListDataItem();
RadListDataItem radListDataItem2 =
new
RadListDataItem();
RadListDataItem radListDataItem3 =
new
RadListDataItem();
RadListDataItem radListDataItem4 =
new
RadListDataItem();
RadListDataItem radListDataItem5 =
new
RadListDataItem();
RadListDataItem radListDataItem6 =
new
RadListDataItem();
RadListDataItem radListDataItem7 =
new
RadListDataItem();
RadListDataItem radListDataItem8 =
new
RadListDataItem();
RadListDataItem radListDataItem9 =
new
RadListDataItem();
RadListDataItem radListDataItem10 =
new
RadListDataItem();
RadListDataItem radListDataItem11 =
new
RadListDataItem();
RadListDataItem radListDataItem12 =
new
RadListDataItem();
RadListDataItem radListDataItem13 =
new
RadListDataItem();
radDropDownList1 =
new
RadDropDownList();
radDropDownList2 =
new
RadDropDownList();
((ISupportInitialize)(radDropDownList1)).BeginInit();
((ISupportInitialize)(radDropDownList2)).BeginInit();
((ISupportInitialize)(
this
)).BeginInit();
SuspendLayout();
//
// radDropDownList1
//
radDropDownList1.DefaultItemsCountInDropDown = 10;
radDropDownList1.DropDownStyle = RadDropDownStyle.DropDownList;
radListDataItem1.Text =
"ListItem 1"
;
radListDataItem2.Text =
"ListItem 2"
;
radListDataItem3.Text =
"ListItem 3"
;
radListDataItem4.Text =
"ListItem 4"
;
radListDataItem5.Text =
"ListItem 5"
;
radListDataItem6.Text =
"ListItem 6"
;
radListDataItem7.Text =
"ListItem 7"
;
radListDataItem8.Text =
"ListItem 8"
;
radListDataItem9.Text =
"ListItem 9"
;
radListDataItem10.Text =
"ListItem 10"
;
radDropDownList1.Items.Add(radListDataItem1);
radDropDownList1.Items.Add(radListDataItem2);
radDropDownList1.Items.Add(radListDataItem3);
radDropDownList1.Items.Add(radListDataItem4);
radDropDownList1.Items.Add(radListDataItem5);
radDropDownList1.Items.Add(radListDataItem6);
radDropDownList1.Items.Add(radListDataItem7);
radDropDownList1.Items.Add(radListDataItem8);
radDropDownList1.Items.Add(radListDataItem9);
radDropDownList1.Items.Add(radListDataItem10);
radDropDownList1.Location =
new
Point(12, 12);
radDropDownList1.MaxDropDownItems = 10;
radDropDownList1.Name =
"radDropDownList1"
;
radDropDownList1.Size =
new
Size(159, 20);
radDropDownList1.TabIndex = 0;
//
// radDropDownList2
//
radDropDownList2.DefaultItemsCountInDropDown = 3;
radDropDownList2.DropDownStyle = RadDropDownStyle.DropDownList;
radListDataItem11.Text =
"ListItem 1"
;
radListDataItem12.Text =
"ListItem 2"
;
radListDataItem13.Text =
"ListItem 3"
;
radDropDownList2.Items.Add(radListDataItem11);
radDropDownList2.Items.Add(radListDataItem12);
radDropDownList2.Items.Add(radListDataItem13);
radDropDownList2.Location =
new
Point(12, 42);
radDropDownList2.MaxDropDownItems = 3;
radDropDownList2.Name =
"radDropDownList2"
;
radDropDownList2.Size =
new
Size(159, 20);
radDropDownList2.TabIndex = 0;
//
// Form4
//
AutoScaleDimensions =
new
SizeF(6F, 13F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize =
new
Size(487, 77);
Controls.Add(radDropDownList1);
Controls.Add(radDropDownList2);
Name =
"Form4"
;
//
//
//
RootElement.ApplyShapeToControl =
true
;
Text =
"Form4"
;
((ISupportInitialize)(radDropDownList1)).EndInit();
((ISupportInitialize)(radDropDownList2)).EndInit();
((ISupportInitialize)(
this
)).EndInit();
ResumeLayout(
false
);
PerformLayout();
}
}
}