To reproduce:
- Add blank drop down list to a form and set AutoSizeItems = true.
- Start and try to open the drop down.
Workaround:
public class MyRadRopDownList : RadDropDownList
{
protected override RadDropDownListElement CreateDropDownListElement()
{
return new MyRadDropDownListElement();
}
}
public class MyRadDropDownListElement : RadDropDownListElement
{
protected override Size GetPopupSize(RadPopupControlBase popup, bool measure)
{
if (this.Items.Count == 0 && this.AutoSizeItems)
{
return new Size(0, 0);
}
return base.GetPopupSize(popup, measure);
}
protected override Type ThemeEffectiveType
{
get
{
return typeof(RadDropDownListElement);
}
}
}